java.lang.RuntimeException

Unable to start activity ComponentInfo{com.example.gridtestproject/com.example.gridtestproject.TestActivity}: android.view.InflateException: Binary XML file line #217: Error inflating class android.widget.ListView

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web52985

  • Unable to start activity ComponentInfo{com.example.gridtestproject/com.example.gridtestproject.TestActivity}: android.view.InflateException: Binary XML file line #217: Error inflating class android.widget.ListView
  • via GitHub by geecko86
    , 1 year ago
    Unable to start activity ComponentInfo{com.geecko.QuickLyric/com.geecko.QuickLyric.MainActivity}: android.view.InflateException: Binary XML file line #19: Error inflating class android.widget.ListView
  • via GitHub by Twinklebear
    , 1 year ago
    Unable to start activity ComponentInfo{what.whatandroid/what.whatandroid.profile.ProfileActivity}: android.view.InflateException: Binary XML file line #1: Error inflating class android.widget.ListView
  • Stack trace

    • java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.gridtestproject/com.example.gridtestproject.TestActivity}: android.view.InflateException: Binary XML file line #217: Error inflating class android.widget.ListView at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2211) at android.app.ActivityThread.access$600(ActivityThread.java:149) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1300) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:153) at android.app.ActivityThread.main(ActivityThread.java:4987) 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:821) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584) at dalvik.system.NativeStart.main(Native Method) Caused by: android.view.InflateException: Binary XML file line #217: Error inflating class android.widget.ListView at android.view.LayoutInflater.createView(LayoutInflater.java:613) at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56) at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685) at android.view.LayoutInflater.rInflate(LayoutInflater.java:746) at android.view.LayoutInflater.rInflate(LayoutInflater.java:749) 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:258) at android.app.Activity.setContentView(Activity.java:1867) at com.example.gridtestproject.TestActivity.onCreate(TestActivity.java:34) at android.app.Activity.performCreate(Activity.java:5020) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148) ... 11 more Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.constructNative(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:417) at android.view.LayoutInflater.createView(LayoutInflater.java:587) ... 25 more Caused by: android.content.res.Resources$NotFoundException: File res/drawable-hdpi/item_selected.xml from drawable resource ID #0x7f02000c at android.content.res.Resources.loadDrawable(Resources.java:1959) at android.content.res.TypedArray.getDrawable(TypedArray.java:601) at android.view.View.<init>(View.java:3343) at android.view.ViewGroup.<init>(ViewGroup.java:433) at android.widget.AdapterView.<init>(AdapterView.java:235) at android.widget.AbsListView.<init>(AbsListView.java:781) at android.widget.ListView.<init>(ListView.java:147) at android.widget.ListView.<init>(ListView.java:143) ... 28 more Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #4: <item> tag requires a 'drawable' attribute or child tag defining a drawable at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:178) at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:881) at android.graphics.drawable.Drawable.createFromXml(Drawable.java:818) at android.content.res.Resources.loadDrawable(Resources.java:1956) ... 35 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

    Unknown user
    Once, 11 months ago
    4 times, 11 months ago
    54 times, 1 year ago
    Unknown user
    Once, 1 year ago