I can’t identify the error on Android

Asked

Viewed 79 times

0

If anyone knows this is wrong.

04-09 13:45:42.403: E/androidruntime(5902): FATAL EXCEPTION: main 04-09 13:45:42.403: E/Androidruntime(5902): java.lang.Runtimeexception: Unable to instantiate Activity Componentinfo{com.teste.teste2/com.teste.teste2}: java.lang.Nullpointerexception 04-09 13:45:42.403: E/Androidruntime(5902): at android.app.Activitythread.performLaunchActivity(Activitythread.java:2585) 04-09 13:45:42.403: E/Androidruntime(5902): at android.app.Activitythread.handleLaunchActivity(Activitythread.java:2679) 04-09 13:45:42.403: E/Androidruntime(5902): at android.app.Activitythread.access$2300(Activitythread.java:125) 04-09 13:45:42,403: E/Androhidrountime(5902): at android.app.Activitythread$H.handleMessage(Activitythread.java:2033) 04-09 13:45:42.403: E/Androidruntime(5902): at android.os.Handler.dispatchMessage(Handler.java:99) 04-09 13:45:42,403: E/Androhidrountime(5902): at android.os.Looper.loop(Looper.java:123) 04-09 13:45:42.403: E/Androidruntime(5902): at android.app.Activitythread.main(Activitythread.java:4627) 04-09 13:45:42,403: E/Androhidrountime(5902): at java.lang.reflect.Method.invokeNative(Native Method) 04-09 13:45:42,403: E/Androhidrountime(5902): at java.lang.reflect.Method.invoke(Method.java:521) 04-09 13:45:42.403: E/Androidruntime(5902): at com.android.Internal.os.Zygoteinit$Methodandargscaller.run(Zygoteinit.java:860) 04-09 13:45:42.403: E/Androidruntime(5902): at com.android.Internal.os.Zygoteinit.main(Zygoteinit.java:618) 04-09 13:45:42,403: E/Androhidrountime(5902): at Dalvik.system.Nativestart.main(Native Method) 04-09 13:45:42.403: E/Androidruntime(5902): Caused by: java.lang.Nullpointerexception 04-09 13:45:42.403: E/Androidruntime(5902): at android.content.Contextwrapper.getResources(Contextwrapper.java:80) 04-09 13:45:42.403: E/Androidruntime(5902): at android.content.Context.getString(Context.java:182) 04-09 13:45:42,403: E/Androhidrountime(5902): at com.teste.teste2.Teste.(Matrix.java:21) 04-09 13:45:42.403: E/Androidruntime(5902): at java.lang.Class.newInstanceImpl(Native native Method) 04-09 13:45:42.403: E/Androidruntime(5902): at java.lang.Class.newInstance(Class.java:1429) 04-09 13:45:42.403: E/Androidruntime(5902): at android.app.Instrumentation.newActivity(Instrumentation.java:1021) 04-09 13:45:42.403: E/Androidruntime(5902): at android.app.Activitythread.performLaunchActivity(Activitythread.java:2577) 04-09 13:45:42.403: E/Androidruntime(5902): ... 11 more

another error in the same way I find no error.

04-09 14:54:20.053: E/Androidruntime(7097): at android.app.Activitythread.performLaunchActivity(Activitythread.java:2585) 04-09 14:54:20.053: E/Androidruntime(7097): at android.app.Activitythread.handleLaunchActivity(Activitythread.java:2679) 04-09 14:54:20.053: E/Androidruntime(7097): at android.app.Activitythread.access$2300(Activitythread.java:125) 04-09 14:54:20.053: E/Androhidrountime(7097): at android.app.Activitythread$H.handleMessage(Activitythread.java:2033) 04-09 14:54:20.053: E/Androidruntime(7097): at android.os.Handler.dispatchMessage(Handler.java:99) 04-09 14:54:20.053: E/Androhidrountime(7097): at android.os.Looper.loop(Looper.java:123) 04-09 14:54:20.053: E/Androidruntime(7097): at android.app.Activitythread.main(Activitythread.java:4627) 04-09 14:54:20.053: E/Androhidrountime(7097): at java.lang.reflect.Method.invokeNative(Native Method) 04-09 14:54:20.053: E/Androhidrountime(7097): at java.lang.reflect.Method.invoke(Method.java:521) 04-09 14:54:20.053: E/Androidruntime(7097): at com.android.Internal.os.Zygoteinit$Methodandargscaller.run(Zygoteinit.java:860) 04-09 14:54:20.053: E/Androidruntime(7097): at com.android.Internal.os.Zygoteinit.main(Zygoteinit.java:618) 04-09 14:54:20.053: E/Androhidrountime(7097): at Dalvik.system.Nativestart.main(Native Method) 04-09 14:54:20.053: E/Androidruntime(7097): Caused by: java.lang.Nullpointerexception 04-09 14:54:20.053: E/Androidruntime(7097): at android.content.Contextwrapper.getResources(Contextwrapper.java:80) 04-09 14:54:20.053: E/Androidruntime(7097): at android.content.Context.getString(Context.java:182) 04-09 14:54:20.053: E/Androhidrountime(7097): at com.teste.teste2.Teste.(Matrix.java:26) 04-09 14:54:20.053: E/Androidruntime(7097): at java.lang.Class.newInstanceImpl(Native native Method) 04-09 14:54:20.053: E/Androidruntime(7097): at java.lang.Class.newInstance(Class.java:1429) 04-09 14:54:20.053: E/Androidruntime(7097): at android.app.Instrumentation.newActivity(Instrumentation.java:1021) 04-09 14:54:20.053: E/Androidruntime(7097): at android.app.Activitythread.performLaunchActivity(Activitythread.java:2577) 04-09 14:54:20.053: E/Androidruntime(7097): ... 11 more

  • 2

    You have a NullPointerException, from what I understand he’s in class Matriz on line 21.

  • @Math after fixing the first error first arises this error that I put in question if you can take a look worth.

  • Apparently it’s the same error in the same class, but it’s switched to line 26. Maybe it’s the case that you add your code to your question to try to identify the root cause of the problem.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.