java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myapp/com.myapp.app.AdvertListActivity}: android.view.InflateException: Binary XML file line #7: Class is not a View android.support.v4.app.Fragment

tip
Do you find the tips below useful? Click on the to mark them and say thanks to Rafael Fischer Viola . Or join the community to write better ones.
  1. 0
    samebug tip
    You can't use hide() or remove() or many things with NULL values, try checking for NULL before calling this methods.
  2. 0
    samebug tip
    Also, check if you're not using android.support.v4.app.FragmentTransaction with android.app.Fragment and vice-versa
  3. 0
    samebug tip
    If you're using nested fragments, you have to use childFragmentManager instead of fragmentManager.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    0.9.1 with ProGuard: InflateException

    GitHub | 7 months ago | dirkam
    java.lang.RuntimeException: Unable to start activity ComponentInfo{.SettingsActivity}: android.view.InflateException: Binary XML file line #13: Error inflating class ListPreference
  6. 0

    Vectors throwing Resources$NotFoundException after updating support library from 23.v to 24.v

    Stack Overflow | 4 months ago | Shivansh
    java.lang.RuntimeException: Unable to start activity ComponentInfo{...MainActivity}: android.view.InflateException: Binary XML file line #54: Error inflating class ...BlaView

  1. maxxi 4 times, last 5 months ago
  2. Hronom 16 times, last 4 weeks ago
8 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.ClassCastException

    android.support.v4.app.Fragment cannot be cast to android.view.View

    at java.lang.Class.asSubclass()
  2. Java RT
    Class.asSubclass
    1. java.lang.Class.asSubclass(Class.java:1380)
    1 frame
  3. Android Platform
    LayoutInflater.inflate
    1. android.view.LayoutInflater.createView(LayoutInflater.java:552)
    2. android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
    3. android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
    4. android.view.LayoutInflater.inflate(LayoutInflater.java:489)
    5. android.view.LayoutInflater.inflate(LayoutInflater.java:396)
    6. android.view.LayoutInflater.inflate(LayoutInflater.java:352)
    6 frames
  4. Android
    PhoneWindow.setContentView
    1. com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)
    1 frame
  5. Android Platform
    Activity.setContentView
    1. android.app.Activity.setContentView(Activity.java:1881)
    1 frame
  6. com.myapp.app
    AdvertListActivity.onCreate
    1. com.myapp.app.AdvertListActivity.onCreate(AdvertListActivity.java:19)
    1 frame
  7. Android Platform
    ActivityThread.main
    1. android.app.Activity.performCreate(Activity.java:5104)
    2. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
    3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
    4. android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
    5. android.app.ActivityThread.access$600(ActivityThread.java:141)
    6. android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
    7. android.os.Handler.dispatchMessage(Handler.java:99)
    8. android.os.Looper.loop(Looper.java:137)
    9. android.app.ActivityThread.main(ActivityThread.java:5041)
    9 frames
  8. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invokeNative(Native Method)
    2. java.lang.reflect.Method.invoke(Method.java:511)
    2 frames
  9. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
    2 frames
  10. Android Platform
    NativeStart.main
    1. dalvik.system.NativeStart.main(Native Method)
    1 frame