java.lang.NullPointerException

Attempt to invoke virtual method 'android.content.pm.ApplicationInfo android.content.Context.getApplicationInfo()' on a null object reference at android.content.pm.ApplicationInfo android.content.ContextWrapper.getApplicationInfo() (ContextWrapper.java:152) at android.content.res.Resources$Theme android.view.ContextThemeWrapper.getTheme() (ContextThemeWrapper.java:103) at int android.app.AlertDialog.resolveDialogTheme(android.content.Context, int) (AlertDialog.java:143) at void android.app.AlertDialog$Builder.<init>(android.content.Context) (AlertDialog.java:360) at void fr.limsi.ARViewer.MainActivity.alertBeforeNewTechnique() (MainActivity.java:329) at void fr.limsi.ARViewer.MainActivity.showAlerts() (MainActivity.java:320) at void fr.limsi.ARViewer.MainActivity.endTrial() (MainActivity.java:369) Dumping all threads without appropriate locks held: thread list lock mutator lock All threads: DALVIK THREADS (20): "main" prio=5 tid=1 Native | group="main" sCount=0 dsCount=0 obj=0x646c7b70 self=0x41da3c80 | sysTid=24708 nice=0 cgrp=apps sched=0/0 handle=0x4010b154 | state=S schedstat=( 2797045067 1500623419 9968 ) utm=213 stm=66 core=0 HZ=100 | stack=0xbe552000-0xbe556000 stackSize=8MB native: android::Looper::pollOnce(int, int*, int*, void**)+92 [0x401ab94d] (libutils.so) native: android::NativeMessageQueue::pollOnce(_JNIEnv*, int)+22 [0x40254331] (libandroid_runtime.so) native: oatexec+18045636 [0x634efac4] (system@framework@boot.oat) at android.os.MessageQueue.nativePollOnce(Native method)

Solutions on the web21423

  • :320) at void fr.limsi.ARViewer.MainActivity.endTrial() (MainActivity.java:369) Dumping all threads without appropriate locks held: thread list lock mutator lock All threads: DALVIK THREADS (20): "main" prio=5 tid=1 Native | group="main
  • via Stack Overflow by Juanca diy johndiy
    , 1 year ago
    Attempt to invoke virtual method 'void android.app.ActionBar.setIcon(int)' on a null object reference at com.blitzar.stiktag.Activities.MainActivity.onCreate(MainActivity.java:20)
  • Attempt to invoke virtual method 'void android.media.MediaPlayer.start()' on a null object reference at com.hafa.hsound.MainActivity.playsound4(MainActivity.java:155) at java.lang.reflect.Method.invoke(Native Method)
  • Stack trace

    • java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.pm.ApplicationInfo android.content.Context.getApplicationInfo()' on a null object reference at android.content.pm.ApplicationInfo android.content.ContextWrapper.getApplicationInfo() (ContextWrapper.java:152) at android.content.res.Resources$Theme android.view.ContextThemeWrapper.getTheme() (ContextThemeWrapper.java:103) at int android.app.AlertDialog.resolveDialogTheme(android.content.Context, int) (AlertDialog.java:143) at void android.app.AlertDialog$Builder.<init>(android.content.Context) (AlertDialog.java:360) at void fr.limsi.ARViewer.MainActivity.alertBeforeNewTechnique() (MainActivity.java:329) at void fr.limsi.ARViewer.MainActivity.showAlerts() (MainActivity.java:320) at void fr.limsi.ARViewer.MainActivity.endTrial() (MainActivity.java:369) Dumping all threads without appropriate locks held: thread list lock mutator lock All threads: DALVIK THREADS (20): "main" prio=5 tid=1 Native | group="main" sCount=0 dsCount=0 obj=0x646c7b70 self=0x41da3c80 | sysTid=24708 nice=0 cgrp=apps sched=0/0 handle=0x4010b154 | state=S schedstat=( 2797045067 1500623419 9968 ) utm=213 stm=66 core=0 HZ=100 | stack=0xbe552000-0xbe556000 stackSize=8MB native: android::Looper::pollOnce(int, int*, int*, void**)+92 [0x401ab94d] (libutils.so) native: android::NativeMessageQueue::pollOnce(_JNIEnv*, int)+22 [0x40254331] (libandroid_runtime.so) native: oatexec+18045636 [0x634efac4] (system@framework@boot.oat) at android.os.MessageQueue.nativePollOnce(Native method) at android.os.MessageQueue.next(MessageQueue.java:138) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:5030)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    2 times, 1 month ago
    Unknown user
    Once, 4 months ago
    Unknown user
    Once, 5 months ago
    31 times, 6 months ago
    Unknown user
    Once, 7 months ago
    81 more bugmates