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

File res/drawable/ucrop_ic_cross.xml #529

Closed
yasdeveloper opened this issue May 25, 2019 · 3 comments
Closed

File res/drawable/ucrop_ic_cross.xml #529

yasdeveloper opened this issue May 25, 2019 · 3 comments

Comments

@yasdeveloper
Copy link

Caused by android.content.res.Resources$NotFoundException: File res/drawable/ucrop_ic_cross.xml from drawable resource ID #0x7f070112
at android.content.res.Resources.loadDrawable(Resources.java:2312)
at com.huawei.android.content.res.ResourcesEx.loadDrawable(ResourcesEx.java:676)
at android.content.res.Resources.getDrawable(Resources.java:774)
at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:465)
at com.yalantis.ucrop.UCropActivity.setupAppBar(UCropActivity.java:345)
at com.yalantis.ucrop.UCropActivity.setupViews(UCropActivity.java:296)
at com.yalantis.ucrop.UCropActivity.onCreate(UCropActivity.java:125)
at android.app.Activity.performCreate(Activity.java:5301)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1090)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2311)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2397)
at android.app.ActivityThread.access$1100(ActivityThread.java:143)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1286)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5398)
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:864)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680)
at dalvik.system.NativeStart.main(NativeStart.java)

Devices
HUAWEI

@Jeff11
Copy link

Jeff11 commented Jun 7, 2019

This happens on Android 4.4.x devices.

Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myapp/com.yalantis.ucrop.UCropActivity}: android.content.res.Resources$NotFoundException: File res/drawable/ucrop_ic_cross.xml from drawable resource ID #0x7f080195
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2429)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2493)
       at android.app.ActivityThread.access$800(ActivityThread.java:166)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1283)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:136)
       at android.app.ActivityThread.main(ActivityThread.java:5584)
       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:1268)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
       at dalvik.system.NativeStart.main(NativeStart.java)
Caused by android.content.res.Resources$NotFoundException: File res/drawable/ucrop_ic_cross.xml from drawable resource ID #0x7f080195
       at android.content.res.Resources.loadDrawable(Resources.java:3451)
       at android.content.res.Resources.getDrawable(Resources.java:1894)
       at androidx.core.content.ContextCompat.getDrawable(ContextCompat.java:456)
       at com.yalantis.ucrop.UCropActivity.setupAppBar(UCropActivity.java:345)
       at com.yalantis.ucrop.UCropActivity.setupViews(UCropActivity.java:296)
       at com.yalantis.ucrop.UCropActivity.onCreate(UCropActivity.java:125)
       at android.app.Activity.performCreate(Activity.java:5447)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2393)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2493)
       at android.app.ActivityThread.access$800(ActivityThread.java:166)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1283)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:136)
       at android.app.ActivityThread.main(ActivityThread.java:5584)
       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:1268)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
       at dalvik.system.NativeStart.main(NativeStart.java)
Caused by org.xmlpull.v1.XmlPullParserException: Binary XML file line #1: invalid drawable tag vector
       at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:969)
       at android.graphics.drawable.Drawable.createFromXml(Drawable.java:913)
       at android.content.res.Resources.loadDrawable(Resources.java:3447)
       at android.content.res.Resources.getDrawable(Resources.java:1894)
       at androidx.core.content.ContextCompat.getDrawable(ContextCompat.java:456)
       at com.yalantis.ucrop.UCropActivity.setupAppBar(UCropActivity.java:345)
       at com.yalantis.ucrop.UCropActivity.setupViews(UCropActivity.java:296)
       at com.yalantis.ucrop.UCropActivity.onCreate(UCropActivity.java:125)
       at android.app.Activity.performCreate(Activity.java:5447)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2393)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2493)
       at android.app.ActivityThread.access$800(ActivityThread.java:166)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1283)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:136)
       at android.app.ActivityThread.main(ActivityThread.java:5584)
       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:1268)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
       at dalvik.system.NativeStart.main(NativeStart.java)

@buivanlan
Copy link

You can add " AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
"
#528

@TermLog TermLog pinned this issue Sep 17, 2019
@TermLog TermLog unpinned this issue Sep 17, 2019
@TermLog TermLog closed this as completed Sep 17, 2019
@damms005
Copy link

You can add " AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
"
#528

You should put those in a try/catch block, because higher android versions throw some nasty error that makes apps explode!

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

5 participants