我在android中开发我的项目。该项目是关于计算矩阵。我在4x4中做了所有的2x2和3x3矩阵(求和,减法,乘法和det)我做了det但是当我尝试求和时,sub或mult程序崩溃了。 PS:对不起,我的英语不好。
这是Logcat:
06-09 16:32:50.658: D/dalvikvm(961): GC_EXTERNAL_ALLOC freed 41K, 53% free 2543K/5379K, external 1625K/2137K, paused 93ms
06-09 16:34:22.848: D/dalvikvm(961): GREF has increased to 201
06-09 16:34:44.098: D/AndroidRuntime(961): Shutting down VM
06-09 16:34:44.098: W/dalvikvm(961): threadid=1: thread exiting with uncaught exception (group=0x40015560)
06-09 16:34:44.108: E/AndroidRuntime(961): FATAL EXCEPTION: main
06-09 16:34:44.108: E/AndroidRuntime(961): java.lang.NullPointerException
06-09 16:34:44.108: E/AndroidRuntime(961): at com.wololo.matrizes.tela4x4Activity$6.onClick(tela4x4Activity.java:410)
06-09 16:34:44.108: E/AndroidRuntime(961): at android.view.View.performClick(View.java:2485)
06-09 16:34:44.108: E/AndroidRuntime(961): at android.view.View$PerformClick.run(View.java:9080)
06-09 16:34:44.108: E/AndroidRuntime(961): at android.os.Handler.handleCallback(Handler.java:587)
06-09 16:34:44.108: E/AndroidRuntime(961): at android.os.Handler.dispatchMessage(Handler.java:92)
06-09 16:34:44.108: E/AndroidRuntime(961): at android.os.Looper.loop(Looper.java:123)
06-09 16:34:44.108: E/AndroidRuntime(961): at android.app.ActivityThread.main(ActivityThread.java:3683)
06-09 16:34:44.108: E/AndroidRuntime(961): at java.lang.reflect.Method.invokeNative(Native Method)
06-09 16:34:44.108: E/AndroidRuntime(961): at java.lang.reflect.Method.invoke(Method.java:507)
06-09 16:34:44.108: E/AndroidRuntime(961): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
06-09 16:34:44.108: E/AndroidRuntime(961): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
06-09 16:34:44.108: E/AndroidRuntime(961): at dalvik.system.NativeStart.main(Native Method)
答案 0 :(得分:0)
这表明你在
处有一个空对象com.wololo.matrizes.tela4x4Activity$6.onClick(tela4x4Activity.java:410)
即。第410行,如果你的文件是tela4x4Activity.java。所以看看那一行,找出哪个对象是null,然后修复。