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 web17675

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 github
Unable to start activity ComponentInfo{a.a/a.a.a.a.MyActivity}: android.view.InflateException: Binary XML file line #7: Error inflating class android.support.v4.widget.DrawerLayout

Solution icon of stackoverflow
Unable to start activity ComponentInfo{com.justedhak.www.i/com.je.www.i.MainActivity}: android.view.InflateException: Binary XML file line #7: Error inflating class android.support.v4.widget.Toolbar

Solution icon of web
via iteramos.com by Unknown author, 1 year ago
Unable to start activity ComponentInfo{com.myapp/com.myapp.ui.activities.LoginSignupActivity}: android.view.InflateException: Binary XML file line #22: Error inflating class com.google.android.gms.common.SignInButton

Solution icon of stackoverflow
via Stack Overflow by Darko Petkovski
, 1 year ago
Unable to start activity ComponentInfo{com.myapp/com.myapp.Main}: android.view.InflateException: Binary XML file line #2: Error inflating class fragment

Solution icon of stackoverflow
Unable to start activity ComponentInfo{app.OSMMapViewActivity}: android.view.InflateException: Binary XML file line #7: Error inflating class org.osmdroid.views.MapView

Solution icon of stackoverflow
via Stack Overflow by user2286261
, 1 year ago
Unable to start activity ComponentInfo{com.example.talkreflection/com.example.talkreflection.StartActivity}: android.view.InflateException: Binary XML file line #1: Error inflating class android.support.v4.widget.DrawerLayout

Solution icon of stackoverflow
Unable to start activity ComponentInfo{com.tatahousing/com.tatahousing.MainActivity}: android.view.InflateException: Binary XML file line #9: Error inflating class android.support.v4.widget.DrawerLayout

Solution icon of web
via techforumnetwork.com by Unknown author, 1 year ago
Unable to start activity ComponentInfo{com.example.facecliq/com.example.facecliq.HomeActivity}: android.view.InflateException: Binary XML file line #1: Error inflating class android.support.v4.widget.DrawerLayout

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, 1 year ago
12 times, 1 month ago
16 times, 8 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
7 more bugmates