Google showed that the device HM NOTE 1LTETD (dior) Android 4.4 failed (the first for the month for all users of all devices). Tell me, please, what is the essence of the error and how to fix it. Location: android.graphics.drawable.Drawable.createFromXmlInner.

java.lang.RuntimeException: Unable to start activity ComponentInfo{пакет/пакет.MainActivity}: android.view.InflateException: Binary XML file line #57: Error inflating class TextView at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2200) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2249) at android.app.ActivityThread.access$800(ActivityThread.java:141) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1212) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5052) 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:793) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609) at dalvik.system.NativeStart.main(Native Method) Caused by: android.view.InflateException: Binary XML file line #57: Error inflating class TextView at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:716) at android.view.LayoutInflater.rInflate(LayoutInflater.java:758) at android.view.LayoutInflater.inflate(LayoutInflater.java:495) at android.view.LayoutInflater.inflate(LayoutInflater.java:400) at android.view.LayoutInflater.inflate(LayoutInflater.java:353) at android.support.v7.a.ac.a(Unknown Source) at android.support.v7.assetContentView(Unknown Source) at пакет.MainActivity.onCreate(Unknown Source)// выделена строка гуглом at android.app.Activity.performCreate(Activity.java:5242) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2164) ... 11 more Caused by: android.content.res.Resources$NotFoundException: File res/drawable/button_task.xml from drawable resource ID #0x7f020048 at android.content.res.Resources.loadDrawable(Resources.java:2139) at android.content.res.MiuiResources.loadDrawable(MiuiResources.java:393) at android.content.res.Resources.loadDrawable(Resources.java:2062) at android.content.res.TypedArray.getDrawable(TypedArray.java:602) at android.view.View.<init>(View.java:3558) at android.widget.TextView.<init>(TextView.java:623) at android.support.v7.widget.bg.<init>(Unknown Source) at android.support.v7.widget.bg.<init>(Unknown Source) at android.support.v7.a.ac.a(Unknown Source) at android.support.v4.h.ac.onCreateView(Unknown Source) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687) ... 21 more Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #2: invalid drawable tag ripple at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:935) at android.graphics.drawable.Drawable.createFromXml(Drawable.java:879) at android.content.res.Resources.createFromXml(Resources.java:2515) at android.content.res.Resources.loadDrawable(Resources.java:2135) ... 31 more 

The code is used in resources / drawable / button markup in xml:

 <?xml version="1.0" encoding="utf-8"?> <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="@color/color_button_start_s"> <item> <shape xmlns:android="http://schemas.android.com/apk/res/android"> <corners android:radius="2dp" /> <solid android:color="@color/color_button_start_t" /> </shape> </item> </ripple> 

    1 answer 1

    Here is your "invalid drawable tag ripple" error. The <ripple> cannot be used in a version lower than 5.0+

    • Thanks. Can you tell me if the billionaire Google didn't bother to write a support library, something like android.support.v21, that would solve the issue with <ripple>? If not, what would you advise to do? (added sample code to the question) - St-st
    • Here, there seems to be a solution github.com/ozodrukh/RippleDrawable - Android Android
    • Thank you. Could not figure out until the end. Decided to use selectors for versions up to 5.0. - St-st