java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.joe.helloworld/com.example.joe.helloworld.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference

Stack Overflow | onyex | 4 months ago
  1. 0

    View.OnClickListener causing crash of tutorial app

    Stack Overflow | 4 months ago | onyex
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.joe.helloworld/com.example.joe.helloworld.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
  2. 0

    Same code but app crashes?

    Stack Overflow | 10 months ago | jcrossley
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.f454.jackc.chiropodist/com.f454.jackc.chiropodist.MainActivity}: java.lang.IllegalArgumentException: AppIndex: The android-app URI host must match the package name and follow the format android-app://<package_name>/<scheme>/[host_path]. Provided URI: android-app://com.f454.jackc.chiropody/http/host/path
  3. 0

    Android Studio - PDFRendererBasic - Unable to replace sample.pdf?

    Stack Overflow | 10 months ago | emvee
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.android.pdfrendererbasic/com.example.android.pdfrendererbasic.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.pdf.PdfRenderer.getPageCount()' on a null object reference
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 22#226125364

    GitHub | 6 months ago | rkdarst
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.aware.phone/com.aware.phone.ui.Aware_QRCode}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.support.v4.widget.DrawerLayout.isDrawerOpen(int)' on a null object reference
  6. 0

    "You need to use a theme.appcompat theme" with Theme.AppCompat as theme, Sdk v23

    Stack Overflow | 1 year ago | guillaume_fr
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myapp.android.debug/com.myapp.mobile.activities.HomeActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.

  1. malhobayyeb 9 times, last 1 week ago
  2. bluebunnty 11 times, last 2 weeks ago
  3. Aria Pahlavan 733 times, last 1 week ago
  4. Alexandru Popa 12 times, last 3 weeks ago
  5. iridic 4 times, last 3 weeks ago
38 more registered users
6 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.RuntimeException

    Unable to start activity ComponentInfo{com.example.joe.helloworld/com.example.joe.helloworld.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference

    at android.app.ActivityThread.performLaunchActivity()
  2. Android Platform
    ActivityThread.handleLaunchActivity
    1. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
    2. android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
    2 frames