java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.fragmentdemo/com.example.fragmentdemo.MainActivity}: android.view.InflateException: Binary XML file line #12: Error inflating class fragment

Stack Overflow | Pranesh Sahu | 7 months 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

    Fragment gives me an error while inflating 1

    Stack Overflow | 7 months ago | Pranesh Sahu
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.fragmentdemo/com.example.fragmentdemo.MainActivity}: android.view.InflateException: Binary XML file line #12: Error inflating class fragment
  2. 0

    how to refer a layout file in external jar

    Stack Overflow | 3 years ago | SelvaMariappan
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.testapplication/com.example.test.MainActivity}: android.content.res.Resources$NotFoundException: File res/drawable-hdpi/ic_launcher.png from xml type layout resource ID #0x7f020000
  3. 0

    Android app not working on HTC Desire but working fine on other devices

    Stack Overflow | 5 years ago | tipycalFlow
    android.content.res.Resources$NotFoundException: Resource ID #0x7f030010
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Android missing resource exception even though it's in the APK

    Stack Overflow | 8 months ago | Ventis
    android.content.res.Resources$NotFoundException: File res/drawable-xxhdpi-v4/abc_ab_share_pack_mtrl_alpha.9.png from xml type layout resource ID #0x7f020000
  6. 0

    Resources$NotFoundException: Resource ID #0x109005e

    GitHub | 5 years ago | Vad1mo
    android.content.res.Resources$NotFoundException: Resource ID #0x109005e
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. android.content.res.Resources$NotFoundException

    Resource ID #0x7f090051 type #0x12 is not valid

    at android.content.res.Resources.loadXmlResourceParser()
  2. Android Platform
    LayoutInflater.inflate
    1. android.content.res.Resources.loadXmlResourceParser(Resources.java:2314)
    2. android.content.res.Resources.getLayout(Resources.java:939)
    3. android.view.LayoutInflater.inflate(LayoutInflater.java:395)
    3 frames
  3. com.example.fragmentdemo
    FragmentB.onCreateView
    1. com.example.fragmentdemo.FragmentB.onCreateView(FragmentB.java:25)
    1 frame
  4. Android Platform
    Activity.onCreateView
    1. android.app.Fragment.performCreateView(Fragment.java:1700)
    2. android.app.FragmentManagerImpl.moveToState(FragmentManager.java:866)
    3. android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1040)
    4. android.app.FragmentManagerImpl.addFragment(FragmentManager.java:1142)
    5. android.app.Activity.onCreateView(Activity.java:4786)
    5 frames
  5. Android Support v4
    FragmentActivity.onCreateView
    1. android.support.v4.app.BaseFragmentActivityHoneycomb.onCreateView(BaseFragmentActivityHoneycomb.java:34)
    2. android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:80)
    2 frames
  6. com.example.fragmentdemo
    MainActivity.onCreateView
    1. com.example.fragmentdemo.MainActivity.onCreateView(MainActivity.java:1)
    1 frame
  7. Android Platform
    LayoutInflater.inflate
    1. android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:689)
    2. android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
    3. android.view.LayoutInflater.inflate(LayoutInflater.java:492)
    4. android.view.LayoutInflater.inflate(LayoutInflater.java:397)
    5. android.view.LayoutInflater.inflate(LayoutInflater.java:353)
    5 frames
  8. Android
    PhoneWindow.setContentView
    1. com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)
    1 frame
  9. Android Platform
    Activity.setContentView
    1. android.app.Activity.setContentView(Activity.java:1929)
    1 frame
  10. com.example.fragmentdemo
    MainActivity.onCreate
    1. com.example.fragmentdemo.MainActivity.onCreate(MainActivity.java:17)
    1 frame
  11. Android Platform
    ActivityThread.main
    1. android.app.Activity.performCreate(Activity.java:5231)
    2. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
    3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
    4. android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
    5. android.app.ActivityThread.access$800(ActivityThread.java:135)
    6. android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
    7. android.os.Handler.dispatchMessage(Handler.java:102)
    8. android.os.Looper.loop(Looper.java:136)
    9. android.app.ActivityThread.main(ActivityThread.java:5001)
    9 frames
  12. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invokeNative(Native Method)
    2. java.lang.reflect.Method.invoke(Method.java:515)
    2 frames
  13. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
    2 frames
  14. Android Platform
    NativeStart.main
    1. dalvik.system.NativeStart.main(Native Method)
    1 frame