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


Solutions on the web53754

Solution icon of stackoverflow
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

Solution icon of stackoverflow
Unable to start activity ComponentInfo{ihnel.tinyapp.xskt/com.ihnel.tinyapp.xskt.Home}: android.view.InflateException: Binary XML file line #7: Class is not a View android.support.v4.app.Fragment

Solution icon of web
Unable to start activity ComponentInfo{com.bugull.meeting/com.bugull.meeting.IntroduceActivity}: android.view.InflateException: Binary XML file line #8: Error inflating class android.support.v4.app.Fragment

Solution icon of stackoverflow
Unable to start activity ComponentInfo{com.example/com.example.MainActivity}: android.view.InflateException: Binary XML file line #40: Error inflating class android.support.v4.app.fragment

Solution icon of github
via GitHub by vi
, 1 year ago
Unable to start activity ComponentInfo{android.support.v4.preference.demo/android.support.v4.preference.demo.MainActivity}: android.view.InflateException: Binary XML file line #7: Error inflating class Toolbar

Solution icon of stackoverflow
via Stack Overflow by choi saab
, 7 months ago
Unable to start activity ComponentInfo{com.example.aadesh.maps/com.example.aadesh.maps.MainActivity}: android.view.InflateException: Binary XML file line #13: Class is not a View com.google.android.gms.maps.MapFragment

Solution icon of github
via GitHub by shkschneider
, 1 year ago
Unable to start activity ComponentInfo{android.support.v4.preference.demo/android.support.v4.preference.demo.MainActivity}: android.view.InflateException: Binary XML file line #7: Error inflating class Toolbar

Solution icon of github
via GitHub by vi
, 1 year ago
Unable to start activity ComponentInfo{android.support.v4.preference.demo/android.support.v4.preference.demo.MainActivity}: android.view.InflateException: Binary XML file line #7: Error inflating class Toolbar

Solution icon of github
via GitHub by vi
, 1 year ago
Unable to start activity ComponentInfo{android.support.v4.preference.demo/android.support.v4.preference.demo.MainActivity}: android.view.InflateException: Binary XML file line #7: Error inflating class Toolbar

Solution icon of github
via GitHub by Grace5921
, 5 months ago
Unable to start activity ComponentInfo{io.github.otaupdater.otaupdater/io.github.otaupdater.otaupdater.activity.SettingsActivity}: android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Class is not a View com.codevscolor.materialpreference.widget.MaterialPreferenceCategory

Stack trace

  • 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 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 #7: Class is not a View android.support.v4.app.Fragment at android.view.LayoutInflater.createView(LayoutInflater.java:604) 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 com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270) at android.app.Activity.setContentView(Activity.java:1881) at com.myapp.app.AdvertListActivity.onCreate(AdvertListActivity.java:19) at android.app.Activity.performCreate(Activity.java:5104) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144) ... 11 more Caused by: java.lang.ClassCastException: android.support.v4.app.Fragment cannot be cast to android.view.View at java.lang.Class.asSubclass(Class.java:1380) at android.view.LayoutInflater.createView(LayoutInflater.java:552) ... 22 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 2 years ago
4 times, 10 months ago
15 times, 4 weeks ago
16 times, 6 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
7 more bugmates