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

android.content.res.Resources$NotFoundException: File res/drawable-xxxhdpi-v4/ic_spotlight_arc.png #1

Closed
ThinkingMonkey opened this issue Jun 16, 2016 · 2 comments

Comments

@ThinkingMonkey
Copy link

ThinkingMonkey commented Jun 16, 2016

Hi,
First of all a great lib for show casing the app. Very nice UI. Have started using it in an application.

Works great on Android 5.

Facing issues on android 4.4.2 :

android.content.res.Resources$NotFoundException: File res/drawable-xxxhdpi-v4/ic_spotlight_arc.png from xml type xml resource ID #0x7f0200d0
    at android.content.res.Resources.loadXmlResourceParser(Resources.java:2396)
    at android.content.res.Resources.loadXmlResourceParser(Resources.java:2351)
    at android.content.res.Resources.getXml(Resources.java:1028)
    at android.content.res.XResources.getXml(XResources.java:745)
    at android.support.graphics.drawable.VectorDrawableCompat.create(VectorDrawableCompat.java:408)
    at android.support.graphics.drawable.AnimatedVectorDrawableCompat.inflate(AnimatedVectorDrawableCompat.java:356)
    at android.support.graphics.drawable.AnimatedVectorDrawableCompat.createFromXmlInner(AnimatedVectorDrawableCompat.java:162)
    at android.support.graphics.drawable.AnimatedVectorDrawableCompat.create(AnimatedVectorDrawableCompat.java:142)
    at com.wooplr.spotlight.SpotlightView.addArcAnimation(SpotlightView.java:521)
    at com.wooplr.spotlight.SpotlightView.access$300(SpotlightView.java:50)
    at com.wooplr.spotlight.SpotlightView$4.onAnimationEnd(SpotlightView.java:433)
    at android.view.animation.Animation$3.run(Animation.java:374)
    at android.os.Handler.handleCallback(Handler.java:733)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:136)
    at android.app.ActivityThread.main(ActivityThread.java:5118)
    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:794)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:610)
    at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
    at dalvik.system.NativeStart.main(Native Method)
Caused by: java.io.FileNotFoundException: Corrupt XML binary file
    at android.content.res.AssetManager.openXmlAssetNative(Native Method)
    at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:495)
    at android.content.res.Resources.loadXmlResourceParser(Resources.java:2378)
    at android.content.res.Resources.loadXmlResourceParser(Resources.java:2351at android.content.res.Resources.getXml(Resources.java:1028at android.content.res.XResources.getXml(XResources.java:745at android.support.graphics.drawable.VectorDrawableCompat.create(VectorDrawableCompat.java:408at android.support.graphics.drawable.AnimatedVectorDrawableCompat.inflate(AnimatedVectorDrawableCompat.java:356at android.support.graphics.drawable.AnimatedVectorDrawableCompat.createFromXmlInner(AnimatedVectorDrawableCompat.java:162at android.support.graphics.drawable.AnimatedVectorDrawableCompat.create(AnimatedVectorDrawableCompat.java:142at com.wooplr.spotlight.SpotlightView.addArcAnimation(SpotlightView.java:521at com.wooplr.spotlight.SpotlightView.access$300(SpotlightView.java:50at com.wooplr.spotlight.SpotlightView$4.onAnimationEnd(SpotlightView.java:433at android.view.animation.Animation$3.run(Animation.java:374at android.os.Handler.handleCallback(Handler.java:733at android.os.Handler.dispatchMessage(Handler.java:95at android.os.Looper.loop(Looper.java:136at android.app.ActivityThread.main(ActivityThread.java:5118at java.lang.reflect.Method.invokeNative(Native Methodat java.lang.reflect.Method.invoke(Method.java:515at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:610at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132at dalvik.system.NativeStart.main(Native Method
@ThinkingMonkey
Copy link
Author

Have currently resolved it by removing the animation for SDK< 21:
Removed animation of arc for SDK < 21.

Waiting for a more legit solution.

@29jitender
Copy link
Owner

Thanks @ThinkingMonkey

Actually i forgot to add this in my Gradle file thats why we were not able to execute AnimatedVectorDrawableCompat. Read this for more info Support Library 23.2

android {  
   defaultConfig {  
     vectorDrawables.useSupportLibrary = true  
    }  
 }  

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

2 participants