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

tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Error:android.view.View$OnClickListener on a null object reference

    Stack Overflow | 7 months ago | Shailender Narang
    java.lang.RuntimeException: Unable to start activity ComponentInfo{}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ImageView.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
  2. 0

    App is force closing when I try to fetch data from SQLiteDB in Android

    Stack Overflow | 1 year ago | Sriram S
    java.lang.RuntimeException: Unable to start activity ComponentInfo{myapps.com.workhours/myapps.com.workhours.ViewDateResult}: android.database.CursorIndexOutOfBoundsException: Index -1 requested, with a size of 0
  3. 0

    Unable to retrieve data from SQLite DB in Android

    Stack Overflow | 1 year ago | Sriram S
    java.lang.RuntimeException: Unable to start activity ComponentInfo{myapps.com.workhours/myapps.com.workhours.ViewDateResult}: android.database.CursorIndexOutOfBoundsException: Index -1 requested, with a size of 0
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Why is DialogFragment.onCreateView called when Activity is being Destroyed?

    Stack Overflow | 4 years ago | WindsurferOak
    java.lang.RuntimeException: Unable to destroy activity {com.myapp/com.myapp.activity.FirstFragment}: java.lang.NullPointerException
  6. 0

    application crashed on orientation change

    Stack Overflow | 4 years ago | user1778855
    java.lang.RuntimeException: Unable to start activity ComponentInfo{..../....Music}: java.lang.NullPointerException

  1. Donsy 4 times, last 2 weeks ago
  2. Adrien 2 times, last 2 weeks ago
  3. rp 1 times, last 2 months ago
  4. Indri Yunita 74 times, last 2 months ago
  5. mhicauber 2 times, last 3 months ago
75 more registered users
20 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{}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ImageView.setOnClickListener(android.view.View$OnClickListener)' on a null object reference

    at android.app.ActivityThread.performLaunchActivity()
  2. Android Platform
    ActivityThread.main
    1. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2316)
    2. android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2376)
    3. android.app.ActivityThread.access$800(ActivityThread.java:147)
    4. android.app.ActivityThread$H.handleMessage(ActivityThread.java:1281)
    5. android.os.Handler.dispatchMessage(Handler.java:102)
    6. android.os.Looper.loop(Looper.java:135)
    7. android.app.ActivityThread.main(ActivityThread.java:5253)
    7 frames
  3. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invoke(Native Method)
    2. java.lang.reflect.Method.invoke(Method.java:372)
    2 frames
  4. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
    2 frames