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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by Pranesh Sahu
, 1 year ago
Unable to start activity ComponentInfo{com.example.fragmentdemo/com.example.fragmentdemo.MainActivity}: android.view.InflateException: Binary XML file line #12: Error inflating class fragment
via Stack Overflow by kalyan kumar
, 2 years ago
Unable to start activity ComponentInfo{com.example.onroad/com.example.onroad.MainActivity}: android.view.InflateException: Binary XML file line #12: Error inflating class fragment
via Stack Overflow by Manos Tzagkarakis
, 2 years ago
Unable to start activity ComponentInfo{com.example.mapapp/com.example.mapapp.MapAppHome}: android.view.InflateException: Binary XML file line #12: Error inflating class fragment
via GitHub by siva8910
, 2 years ago
Unable to start activity ComponentInfo{ai.wit.eval.witeval/ai.wit.eval.witeval.MyActivity}: android.view.InflateException: Binary XML file line #12: Error inflating class fragment
via Stack Overflow by J. Shmoe
, 7 months ago
Unable to start activity ComponentInfo{com.example.kun.carkila/com.example.kun.carkila.ownerhome}: android.view.InflateException: Binary XML file line #12: Error inflating class fragment
via Stack Overflow by Khatokar Rakshith
, 2 years ago
Unable to start activity ComponentInfo{com.example.googlemapdemo/com.example.googlemapdemo.MainActivity}: android.view.InflateException: Binary XML file line #12: Error inflating class fragment
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
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2314)
at android.content.res.Resources.getLayout(Resources.java:939)
at android.view.LayoutInflater.inflate(LayoutInflater.java:395)
at com.example.fragmentdemo.FragmentB.onCreateView(FragmentB.java:25)
at android.app.Fragment.performCreateView(Fragment.java:1700)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:866)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1040)
at android.app.FragmentManagerImpl.addFragment(FragmentManager.java:1142)
at android.app.Activity.onCreateView(Activity.java:4786)
at android.support.v4.app.BaseFragmentActivityHoneycomb.onCreateView(BaseFragmentActivityHoneycomb.java:34)
at com.example.fragmentdemo.MainActivity.onCreateView(MainActivity.java:1)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:689)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at android.app.Activity.setContentView(Activity.java:1929)
at com.example.fragmentdemo.MainActivity.onCreate(MainActivity.java:17)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)

Users with the same issue

30 times, 1 year ago
61 times, 1 year ago
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Know the solutions? Share your knowledge to help other developers to debug faster.