java.lang.NullPointerException

Attempt to invoke interface method 'java.lang.String java.lang.CharSequence.toString()' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390) at android.app.ActivityThread.access$800(ActivityThread.java:151) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)

Solutions on the web21213

  • Attempt to invoke interface method 'java.lang.String java.lang.CharSequence.toString()' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325) at android.app.ActivityThread.handleLaunchActivity
  • Attempt to invoke virtual method 'void android.widget.ListView.setAdapter(android.widget.ListAdapter)' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379 at
  • Attempt to invoke virtual method 'java.lang.CharSequence android.support.v7.widget.Toolbar.getTitle()' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298) at
  • Stack trace

    • java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.String java.lang.CharSequence.toString()' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390) at android.app.ActivityThread.access$800(ActivityThread.java:151) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5257) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.String java.lang.CharSequence.toString()' on a null object reference at android.content.res.TypedArray.getString(TypedArray.java:176) at android.view.View.<init>(View.java:3992) at android.view.ViewGroup.<init>(ViewGroup.java:497) at android.view.ViewGroup.<init>(ViewGroup.java:493) at android.view.ViewGroup.<init>(ViewGroup.java:489) at android.view.ViewGroup.<init>(ViewGroup.java:485) at android.widget.FrameLayout.<init>(FrameLayout.java:103) at com.android.internal.policy.impl.PhoneWindow$DecorView.<init>(PhoneWindow.java:2226) at com.android.internal.policy.impl.PhoneWindow.generateDecor(PhoneWindow.java:3316) at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:3669) at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:368) at android.app.Activity.setContentView(Activity.java:2145) at com.example.ipt02.spotchecktrial1.MainActivity.onCreate(MainActivity.java:22) at android.app.Activity.performCreate(Activity.java:5990) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)

    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, 2 months ago
    Once, 8 months ago
    5 times, 1 year ago
    Unknown user
    Once, 1 year ago