hnvn / flutter_image_cropper

A Flutter plugin for Android and iOS supports cropping images
971 stars 374 forks source link

UCropActivity.setupViews android.content.res.Resources$NotFoundException - Unable to find resource ID #<address> // Fatal Exception: java.lang.RuntimeException: Unable to start activity #412

Open dmytrohurskyi opened 1 year ago

dmytrohurskyi commented 1 year ago

Error reported by Crashlytics image_cropper: 3.0.2

Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{io.kaizhan.vfa/com.yalantis.ucrop.UCropActivity}: android.view.InflateException: Binary XML file line #27: Binary XML file line #46: Error inflating class ImageView
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
       at android.app.ActivityThread.-wrap11()
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:164)
       at android.app.ActivityThread.main(ActivityThread.java:6494)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

Caused by android.view.InflateException: Binary XML file line #27: Binary XML file line #46: Error inflating class ImageView

Caused by android.content.res.Resources$NotFoundException: Drawable (missing name) with resource ID #0x7f07009d

Caused by android.content.res.Resources$NotFoundException: Unable to find resource ID #0x7f07009d
       at android.content.res.ResourcesImpl.getResourceName(ResourcesImpl.java:253)
       at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:760)
       at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:630)
       at android.content.res.Resources.loadDrawable(Resources.java:886)
       at android.content.res.TypedArray.getDrawableForDensity(TypedArray.java:953)
       at android.content.res.TypedArray.getDrawable(TypedArray.java:928)
       at android.content.res.XResources$XTypedArray.getDrawable(XResources.java:1363)
       at android.widget.ImageView.<init>(ImageView.java:188)
       at android.widget.ImageView.<init>(ImageView.java:171)
       at androidx.appcompat.widget.AppCompatImageView.<init>(AppCompatImageView.java:74)
       at androidx.appcompat.widget.AppCompatImageView.<init>(AppCompatImageView.java:69)
       at androidx.appcompat.app.AppCompatViewInflater.createImageView(AppCompatViewInflater.java:199)
       at androidx.appcompat.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:119)
       at androidx.appcompat.app.AppCompatDelegateImpl.createView(AppCompatDelegateImpl.java:1563)
       at androidx.appcompat.app.AppCompatDelegateImpl.onCreateView(AppCompatDelegateImpl.java:1614)
       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:772)
       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:863)
       at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:866)
       at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
       at android.view.LayoutInflater.parseInclude(LayoutInflater.java:995)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:859)
       at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:866)
       at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
       at com.yalantis.ucrop.UCropActivity.setupViews(UCropActivity.java:309)
       at com.yalantis.ucrop.UCropActivity.onCreate(UCropActivity.java:130)
       at android.app.Activity.performCreate(Activity.java:7009)
       at android.app.Activity.performCreate(Activity.java:7000)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
       at android.app.ActivityThread.-wrap11()
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:164)
       at android.app.ActivityThread.main(ActivityThread.java:6494)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
meet7-sagar23 commented 1 year ago

Is this crash Device Specific? @dmytrohurskyi

wudaming1 commented 11 months ago

I have encounter the same issue, but only happens on Nexus 5X.