Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invaild drawable tag ripple #20

Open
KuaQ opened this issue Aug 28, 2015 · 9 comments
Open

Invaild drawable tag ripple #20

KuaQ opened this issue Aug 28, 2015 · 9 comments

Comments

@KuaQ
Copy link

KuaQ commented Aug 28, 2015

When I try to build app with this liblary I have error: invaild drawable tag ripple
I based on the samples and I dont know what is wrong 😶😶

@ozodrukh
Copy link
Owner

Could you share your xml code? And please checkout which version are u using

@KuaQ
Copy link
Author

KuaQ commented Aug 28, 2015

A using 2.0 version ('com.github.ozodrukh:RippleDrawable:2.0.0)

XML code:

<item android:id="@android:id/mask">
    <color android:color="@color/accent"/>
</item>

@KuaQ
Copy link
Author

KuaQ commented Aug 28, 2015

Of course I mean I have this error when I try to run app, have no error when building
Of course in XML is added ignore="newapi"

@SunnyDayDev
Copy link

I think i have a same issue. Mostly on Samsung (maybe little more manufacturers), on other devices all is ok.

Caused by: android.content.res.Resources$NotFoundException: File res/drawable/simple_highlight_light_ripple.xml from drawable resource ID #0x7f020164
       at android.content.res.Resources.loadDrawable(Resources.java:3063)
       at android.content.res.Resources.getDrawable(Resources.java:1624)
       at codetail.graphics.drawables.LollipopDrawablesCompat.loadDrawableForCookie(LollipopDrawablesCompat.java:272)
       at codetail.graphics.drawables.LollipopDrawablesCompat.loadDrawable(LollipopDrawablesCompat.java:234)
       at codetail.graphics.drawables.LollipopDrawablesCompat.getDrawable(LollipopDrawablesCompat.java:177)
       at com.medicine.ima._old.congress.activity.GalleryActivity.initialise(GalleryActivity.java:97)
       at com.medicine.ima._old.congress.activity.GalleryActivity.onCreate(GalleryActivity.java:49)
       at android.app.Activity.performCreate(Activity.java:5451)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2292)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2386)
       at android.app.ActivityThread.access$900(ActivityThread.java:169)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1277)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:136)
       at android.app.ActivityThread.main(ActivityThread.java:5476)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:515)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
       at dalvik.system.NativeStart.main(NativeStart.java)
Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #2: invalid drawable tag ripple
       at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:986)
       at android.graphics.drawable.Drawable.createFromXml(Drawable.java:930)
       at android.content.res.Resources.loadDrawable(Resources.java:3059)
       at android.content.res.Resources.getDrawable(Resources.java:1624)
       at codetail.graphics.drawables.LollipopDrawablesCompat.loadDrawableForCookie(LollipopDrawablesCompat.java:272)
       at codetail.graphics.drawables.LollipopDrawablesCompat.loadDrawable(LollipopDrawablesCompat.java:234)
       at codetail.graphics.drawables.LollipopDrawablesCompat.getDrawable(LollipopDrawablesCompat.java:177)
       at com.medicine.ima._old.congress.activity.GalleryActivity.initialise(GalleryActivity.java:97)
       at com.medicine.ima._old.congress.activity.GalleryActivity.onCreate(GalleryActivity.java:49)
       at android.app.Activity.performCreate(Activity.java:5451)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2292)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2386)
       at android.app.ActivityThread.access$900(ActivityThread.java:169)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1277)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:136)
       at android.app.ActivityThread.main(ActivityThread.java:5476)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:515)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
       at dalvik.system.NativeStart.main(NativeStart.java)

simple_highlight_light_ripple.xml:

<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:color="@color/main_higlight_on_dark"
        tools:ignore="NewApi">
    <item android:id="@android:id/mask"
          android:drawable="@drawable/simple_highlight_light"/>
</ripple>

Maybe problem is in @android:id/mask?

Version of RippleDrawable 2.0.0.

Anyway, Thanks for your great job)

@pozuelog
Copy link

pozuelog commented Nov 6, 2015

Same error is happening here on a Samsung Galaxy Tab. With this drwable xml:

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

It is working right with other devices

@shayanzoro
Copy link

Same issue here

@ozodrukh
Copy link
Owner

ozodrukh commented Jun 22, 2016

Going to fix it in this weekend😉

Edit
looked to source of VectorDrawableCompat (in order to fix issues) looks like i will have hot weekends 😄
Open for help or pull requests

@michal8989
Copy link

same issue here, any updates?

@e16din
Copy link

e16din commented Oct 3, 2016

same issue here. To fix it I use my own colors, try this drawable:

<?xml version="1.0" encoding="utf-8"?>
<ripple
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="#000">

    <item>
        <shape android:shape="oval">
            <solid android:color="#6c6"/>
        </shape>
    </item>

</ripple>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants