-2

我在android中开发我的项目。该项目是关于计算矩阵的。我在 4x4 中做了所有 2x2 和 3x3 矩阵(求和、减法、乘法和 det),我做了 det,但是当我尝试求和、求和或求和时,程序崩溃了。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)
4

1 回答 1

0

这表明您在

com.wololo.matrizes.tela4x4Activity$6.onClick(tela4x4Activity.java:410)

即第 410 行,如果您的文件是 tela4x4Activity.java。所以看看那一行,找出哪个对象是空的,然后修复。

于 2013-06-09T16:38:27.933 回答