當按下按鈕時,我的應用程序開始崩潰,通常錯誤日誌指向正確的方向,但這次我無法破譯它。任何幫助將真正意識到:Android:錯誤不告訴我任何東西我可以運行
錯誤:
10-24 10:15:31.105: E/AndroidRuntime(22640): FATAL EXCEPTION: main
10-24 10:15:31.105: E/AndroidRuntime(22640): java.lang.IllegalStateException: Could not execute method of the activity
10-24 10:15:31.105: E/AndroidRuntime(22640): at android.view.View$1.onClick(View.java:3116)
10-24 10:15:31.105: E/AndroidRuntime(22640): at android.view.View.performClick(View.java:3644)
10-24 10:15:31.105: E/AndroidRuntime(22640): at android.view.View$PerformClick.run(View.java:14313)
10-24 10:15:31.105: E/AndroidRuntime(22640): at android.os.Handler.handleCallback(Handler.java:605)
10-24 10:15:31.105: E/AndroidRuntime(22640): at android.os.Handler.dispatchMessage(Handler.java:92)
10-24 10:15:31.105: E/AndroidRuntime(22640): at android.os.Looper.loop(Looper.java:137)
10-24 10:15:31.105: E/AndroidRuntime(22640): at android.app.ActivityThread.main(ActivityThread.java:4517)
10-24 10:15:31.105: E/AndroidRuntime(22640): at java.lang.reflect.Method.invokeNative(Native Method)
10-24 10:15:31.105: E/AndroidRuntime(22640): at java.lang.reflect.Method.invoke(Method.java:511)
10-24 10:15:31.105: E/AndroidRuntime(22640): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:993)
10-24 10:15:31.105: E/AndroidRuntime(22640): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:760)
10-24 10:15:31.105: E/AndroidRuntime(22640): at dalvik.system.NativeStart.main(Native Method)
10-24 10:15:31.105: E/AndroidRuntime(22640): Caused by: java.lang.reflect.InvocationTargetException
10-24 10:15:31.105: E/AndroidRuntime(22640): at java.lang.reflect.Method.invokeNative(Native Method)
10-24 10:15:31.105: E/AndroidRuntime(22640): at java.lang.reflect.Method.invoke(Method.java:511)
10-24 10:15:31.105: E/AndroidRuntime(22640): at android.view.View$1.onClick(View.java:3111)
10-24 10:15:31.105: E/AndroidRuntime(22640): ... 11 more
10-24 10:15:31.105: E/AndroidRuntime(22640): Caused by: java.lang.NullPointerException
10-24 10:15:31.105: E/AndroidRuntime(22640): at com.directenquiries.assessment.tool.AddAsset.AddAsset(AddAsset.java:476)
10-24 10:15:31.105: E/AndroidRuntime(22640): ... 14 more
什麼在AddAsset.java:476? –
你需要發佈導致NPE的代碼在'AddAsset.java:476' –