java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.ramy.medicare/com.example.ramy.medicare.Profile.materialtabs.activity.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 | Ramy Salah | 3 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Null pointer exception When making an intent crash

    Stack Overflow | 3 months ago | Ramy Salah
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.ramy.medicare/com.example.ramy.medicare.Profile.materialtabs.activity.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

    Starting new activity crashes Android app

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

    Android Studio Error: "Caused by: java.lang.NullPointerException: Attempt to invoke virtual method"

    Stack Overflow | 11 months ago | Ravin
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.ravinmadurawe.gpacalculator/com.example.ravinmadurawe.gpacalculator.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    My android Onclicklistener

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

    Unable to start activity ComponentInfo probably because of the Sqlitedatabase object

    Stack Overflow | 1 month ago | Narayan Payyoor
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.cp.profiletoggler/com.example.cp.profiletoggler.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference

  1. Indri Yunita 7 times, last 1 month ago
  2. andreeaa marin 184 times, last 2 months ago
  3. Reich 59 times, last 3 months ago
  4. gamebusterz 42 times, last 1 day ago
  5. Emrah Küçük 3 times, last 3 months ago
42 more registered users
14 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.ramy.medicare/com.example.ramy.medicare.Profile.materialtabs.activity.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:2665)
    2. android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
    2 frames