Didn’t find class “com.esri.arcgisruntime.ArcGISRuntimeEnvironment” Code Answer

I am using ESRI maps in my android app. I want to Shrink, obfuscate, and optimize my app for that I enabled R8 in my application in gradle.properties file by adding this line:

android.enableR8 = true

along with this, I enabled these by adding the following lines in app-level build.gradle

debug {
   minifyEnabled true
   shrinkResources true
   zipAlignEnabled true

release {
   minifyEnabled true
   shrinkResources true
   zipAlignEnabled true

I have tried to add the following things in progaurd-rules.pro file to keep these at run time. Reference: https://stackoverflow.com/a/34807601/2462531

-keep class com.esri.** { *; }
-keep interface com.esri.** { *; }
-keep class org.codehaus.jackson.** { *; }
-dontwarn org.codehaus.jackson.map.ext.**
-dontwarn jcifs.http.**

But still am facing the same issue when I run the app getting crashed with the following error message:

JNI DETECTED ERROR IN APPLICATION: JNI FindClass called with pending exception java.lang.ClassNotFoundException: Didn’t find class “com.esri.arcgisruntime.ArcGISRuntimeEnvironment” on path: DexPathList

Need any link or suggestion to ESRI progaurd rules would be appreciated.


The problem got resolved by

Uninstall and reinstall


Related Posts

© No Copyrights, All Questions are retrived from public domain.
Tutorial Guruji