Uncaught Exception Illegal class access: androidx.appcompat.widget.ContentFrameLayout attempting to access androidx.appcompat.app.r

Viewed 613

I'm developing a flutter application to track the location of a device. The debug build of the application working properly in real devices.

But when I create release build it crash after navigate to couple of screens in real device(running Android 11)

This is the error I'm getting

‼️  Uncaught Exception: Illegal class access:'androidx.appcompat.widget.ContentFrameLayout' attempting to access 
'androidx.appcompat.app.r' (declaration of 'androidx.appcompat.widget.ContentFrameLayout'
 appears in /data/app/~~sJrFFiqF4X5jnDRJOtMb6g==/com.haulmatic.mobileassistant-FfFbU5oe1FIOFZ0dx6dnow==/base.apk)

 at androidx.appcompat.widget.ContentFrameLayout.onAttachedToWindow(Unknown Source:7)
        at android.view.View.dispatchAttachedToWindow(View.java:20573)
        at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3500)
        at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3507)
        at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3507)
        at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3507)
        at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3507)
        at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2488)
        at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2023)
        at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8314)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:972)
        at android.view.Choreographer.doCallbacks(Choreographer.java:796)
        at android.view.Choreographer.doFrame(Choreographer.java:731)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:223)
        at android.app.ActivityThread.main(ActivityThread.java:7948)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:603)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

It doesn't give much information about the actual error. I googled and couldn't fine any solution.

Does anyone know what is this error? and why it is occurring?

gradle-wrapper.properties file

#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
0 Answers
Related