java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.accurat.webaccess/com.example.accurat.webaccess.MainActivity}: java.lang.ClassCastException: com.example.accurat.webaccess.MainActivity cannot be cast to android.widget.AdapterView$OnItemClickListener

Stack Overflow | faisal1208 | 1 month ago
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

    Android unable to launch the app in emulator

    Stack Overflow | 1 month ago | faisal1208
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.accurat.webaccess/com.example.accurat.webaccess.MainActivity}: java.lang.ClassCastException: com.example.accurat.webaccess.MainActivity cannot be cast to android.widget.AdapterView$OnItemClickListener
  2. 0

    Null Pointer Exeception on viewPager.setAdapter(new MyFragmentPagerAdapter(getSupportFragmentManager()));

    Stack Overflow | 2 years ago | Peter Paul
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.lilstiikz.wehr/com.example.lilstiikz.wehr.MainActivity}: java.lang.NullPointerException Caused by: java.lang.NullPointerException
  3. 0

    when i run my applications using android studio1.5.1 and API23 it crashes on my phone samsung galaxy sduos

    Stack Overflow | 1 year ago | Sandeep Brar
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.andriod.myapplication/com.example.andriod.myapplication.MainActivity}: android.view.InflateException: Binary XML file line #19: Error inflating class android.support.design.widget.NavigationView at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1970) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1995) at android.app.ActivityThread.access$600(ActivityThread.java:128) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1161) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4517) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:993) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:760) at dalvik.system.NativeStart.main(Native Method) Caused by: android.view.InflateException: Binary XML file line #19: Error inflating class android.support.design.widget.NavigationView at android.view.LayoutInflater.createView(LayoutInflater.java:606) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680) at android.view.LayoutInflater.rInflate(LayoutInflater.java:739) at android.view.LayoutInflater.inflate(LayoutInflater.java:489) at android.view.LayoutInflater.inflate(LayoutInflater.java:396) at android.view.LayoutInflater.inflate(LayoutInflater.java:352) at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:256) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:109) at com.example.andriod.myapplication.MainActivity.onCreate(MainActivity.java:25) at android.app.Activity.performCreate(Activity.java:4470) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1053) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1934) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1995)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    #16: Error inflating class android.support.design.widget.NavigationView

    Stack Overflow | 11 months ago | Amit Chhatbar
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.amitchhatbar11.navdrawerappdemo/com.example.amitchhatbar11.navdrawerappdemo.MainActivity}: android.view.InflateException: Binary XML file line #16: Error inflating class android.support.design.widget.NavigationView at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230) at android.app.ActivityThread.access$600(ActivityThread.java:141) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:5041) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) at dalvik.system.NativeStart.main(Native Method) Caused by: android.view.InflateException: Binary XML file line #16: Error inflating class android.support.design.widget.NavigationView at android.view.LayoutInflater.createView(LayoutInflater.java:613) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687) at android.view.LayoutInflater.rInflate(LayoutInflater.java:746) at android.view.LayoutInflater.inflate(LayoutInflater.java:489) at android.view.LayoutInflater.inflate(LayoutInflater.java:396) at android.view.LayoutInflater.inflate(LayoutInflater.java:352) at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:276) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:136) at com.example.amitchhatbar11.navdrawerappdemo.MainActivity.onCreate(MainActivity.java:26) at android.app.Activity.performCreate(Activity.java:5104) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
  6. 0

    java.lang.NoClassDefFoundError after adding dependences

    Stack Overflow | 1 year ago | Pecana
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.pecana.example/com.pecana.example.MainActivity}: android.view.InflateException: Binary XML file line #27: Error inflating class com.pecana.example.SlidingTabLayout at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2295) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2349) at android.app.ActivityThread.access$700(ActivityThread.java:159) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:176) at android.app.ActivityThread.main(ActivityThread.java:5419) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:525) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862) at dalvik.system.NativeStart.main(Native Method) Caused by: android.view.InflateException: Binary XML file line #27: Error inflating class com.pecana.example.SlidingTabLayout at android.view.LayoutInflater.createView(LayoutInflater.java:626) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:702) at android.view.LayoutInflater.rInflate(LayoutInflater.java:761) at android.view.LayoutInflater.rInflate(LayoutInflater.java:769) at android.view.LayoutInflater.inflate(LayoutInflater.java:498) at android.view.LayoutInflater.inflate(LayoutInflater.java:398) at android.view.LayoutInflater.inflate(LayoutInflater.java:354) at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:256) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:109) at com.pecana.example.MainActivity.onCreate(MainActivity.java:162) at android.app.Activity.performCreate(Activity.java:5372) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2257) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2349)

    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.ClassCastException

      com.example.accurat.webaccess.MainActivity cannot be cast to android.widget.AdapterView$OnItemClickListener

      at com.example.accurat.webaccess.MainActivity.onCreate()
    2. com.example.accurat
      MainActivity.onCreate
      1. com.example.accurat.webaccess.MainActivity.onCreate(MainActivity.java:64)
      1 frame
    3. Android Platform
      ActivityThread.main
      1. android.app.Activity.performCreate(Activity.java:5990)
      2. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
      3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
      4. android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
      5. android.app.ActivityThread.access$800(ActivityThread.java:151)
      6. android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
      7. android.os.Handler.dispatchMessage(Handler.java:102)
      8. android.os.Looper.loop(Looper.java:135)
      9. android.app.ActivityThread.main(ActivityThread.java:5254)
      9 frames
    4. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    5. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
      2 frames