java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.adi.fragment2/com.example.adi.fragment2.MainActivity}: java.lang.ClassCastException: com.example.adi.fragment2.MainActivity cannot be cast to android.app.Activity

Stack Overflow | hamster | 2 weeks ago
  1. 0

    Need Help in Fragments(Android)

    Stack Overflow | 2 weeks ago | hamster
    java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.adi.fragment2/com.example.adi.fragment2.MainActivity}: java.lang.ClassCastException: com.example.adi.fragment2.MainActivity cannot be cast to android.app.Activity
  2. 0

    android.os.DeadObjectException HATASI :( | Geleceği Yazanlar

    com.tr | 2 months ago
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.PAKET ADI.1234PRO/com.PAKET ADI.MainActivity}: java.lang.RuntimeException: Package manager has died
  3. 0

    GoogleApiClient.Builder.enableAutoManage() giving me an error

    Stack Overflow | 5 months ago | McFiddlyWiddly
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.android.googlelogin/com.example.android.googlelogin.MainActivity}: java.lang.ClassCastException: com.example.android.googlelogin.MainActivity cannot be cast to com.google.android.gms.common.api.GoogleApiClient$OnConnectionFailedListener
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Unable to specify List<String> as a return type in AsyncTask:doInBackground

    Stack Overflow | 3 months ago | Vivek
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.android.sunshine/com.example.android.sunshine.MainActivity}: java.lang.ClassCastException: com.example.android.sunshine.ForecastFragment$FetchWeatherTask cannot be cast to java.util.List
  6. 0

    method getInputStream() in HttpURLConnection in Android always failed

    Stack Overflow | 4 years ago | user1842061
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.network/com.example.network.MainActivity}: android.os.NetworkOnMainThreadException

  1. andreeaa marin 180 times, last 2 weeks ago
  2. Reich 59 times, last 2 weeks ago
  3. gamebusterz 28 times, last 6 days ago
  4. Emrah Küçük 3 times, last 1 month ago
  5. Riyaz 2 times, last 2 months ago
43 more registered users
11 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 instantiate activity ComponentInfo{com.example.adi.fragment2/com.example.adi.fragment2.MainActivity}: java.lang.ClassCastException: com.example.adi.fragment2.MainActivity cannot be cast to android.app.Activity

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