我的朋友有一个我尝试过的XML解析示例,但它没有用。所以,他只是将项目文件夹放在他的flashdrive上,然后我将它导入Eclipse。奇怪的是,该应用仍然强行关闭。关于为什么会发生这种情况的任何想法?这是相同的项目!如果您需要我们正在使用的代码,可以在问题中找到here。
提前谢谢。
编辑:来自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
答案 0 :(得分:0)
出于这样或那样的原因,该程序在发布的问题日期之后的第二天工作。我的猜测是随着互联网连接而发生的事情。