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

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 Florian Mac Langlade
, 10 months ago
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
via Stack Overflow by Nguyen Minh Binh
, 2 years ago
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
via GitHub by kkocel
, 1 year ago
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
via Stack Overflow by Moudiz
, 2 years ago
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
via Stack Overflow by Darko Petkovski
, 2 years ago
Unable to start activity ComponentInfo{com.myapp/com.myapp.Main}: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
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
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)
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 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)
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)

Users with the same issue

12 times, 3 months ago
16 times, 10 months ago
4 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 11 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

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