项目可以在一台计算机上运行,​​但不能在另一台计算机上运行?

发布于 2024-11-30 19:47:34 字数 2643 浏览 0 评论 0原文

我的朋友有一个 XML 解析示例,我尝试遵循该示例,但没有成功。因此,他只是将项目文件夹放在他的闪存驱动器上,然后我将其导入到 Eclipse 中。但奇怪的是,该应用程序仍然强行关闭。关于为什么会发生这种情况有什么想法吗?这是同一个项目!如果您想要我们正在使用的代码,可以在此处找到,问题中。

先感谢您。

编辑:来自 LogCat 的崩溃日志:

08-22 10:37:35.279: ERROR/AndroidRuntime(482): FATAL EXCEPTION: main
08-22 10:37:35.279: ERROR/AndroidRuntime(482): java.lang.RuntimeException: Unable to start activity ComponentInfo{android.example.testone.parsing/android.example.testone.parsing.LocalParsingAttemptNUMBERoneActivity}: java.lang.NullPointerException
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     at android.app.ActivityThread.access$2300(ActivityThread.java:125)
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     at android.os.Handler.dispatchMessage(Handler.java:99)
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     at android.os.Looper.loop(Looper.java:123)
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     at android.app.ActivityThread.main(ActivityThread.java:4627)
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     at java.lang.reflect.Method.invokeNative(Native Method)
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     at java.lang.reflect.Method.invoke(Method.java:521)
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     at dalvik.system.NativeStart.main(Native Method)
08-22 10:37:35.279: ERROR/AndroidRuntime(482): Caused by: java.lang.NullPointerException
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     at android.example.testone.parsing.LocalParsingAttemptNUMBERoneActivity.onCreate(LocalParsingAttemptNUMBERoneActivity.java:59)
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     ... 11 more

My friend has an XML parsing example that I tried following, but it didn't work. So, he simply put the project folder on his flashdrive, and I then imported it into Eclipse. Strangely though, the app is still force closing. Any ideas on why this could be occuring? It's the same project! If you want the code we're working with, it can be found here, in the question.

Thank you in advance.

EDIT: Crash log from LogCat:

08-22 10:37:35.279: ERROR/AndroidRuntime(482): FATAL EXCEPTION: main
08-22 10:37:35.279: ERROR/AndroidRuntime(482): java.lang.RuntimeException: Unable to start activity ComponentInfo{android.example.testone.parsing/android.example.testone.parsing.LocalParsingAttemptNUMBERoneActivity}: java.lang.NullPointerException
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     at android.app.ActivityThread.access$2300(ActivityThread.java:125)
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     at android.os.Handler.dispatchMessage(Handler.java:99)
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     at android.os.Looper.loop(Looper.java:123)
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     at android.app.ActivityThread.main(ActivityThread.java:4627)
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     at java.lang.reflect.Method.invokeNative(Native Method)
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     at java.lang.reflect.Method.invoke(Method.java:521)
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     at dalvik.system.NativeStart.main(Native Method)
08-22 10:37:35.279: ERROR/AndroidRuntime(482): Caused by: java.lang.NullPointerException
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     at android.example.testone.parsing.LocalParsingAttemptNUMBERoneActivity.onCreate(LocalParsingAttemptNUMBERoneActivity.java:59)
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
08-22 10:37:35.279: ERROR/AndroidRuntime(482):     ... 11 more

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

爱格式化 2024-12-07 19:47:34

由于某种原因,该程序在发布问题日期的第二天开始运行。我的猜测是互联网连接发生了一些事情。

For one reason or another, the program is working the day after than the posted question's date. My guess is something that went on with the internet connectivity.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文