I enabled R8 in my application in `gradle.properties` file
android.enableR8 = true
along with this I enabled these in app-level build.gradle
release { minifyEnabled true shrinkResources true zipAlignEnabled true }
I have tried to add the following things to keep these at run time.
-keep class com.esri.** { *; } -keep interface com.esri.** { *; } -keep class org.codehaus.jackson.** { *; } -dontwarn org.codehaus.jackson.map.ext.** -dontwarn jcifs.http.**
Reference: com.esri.arcgis.android:arcgis-android:10.2.6-2 with proguard - Stack Overflow
But still am facing the same issue.
Error message when I run the app:
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
Can you please help me with this.
Hi Shylendra Madda,
Have you tried setting R8 to false?
Such as:
android.enableR8 = false
As pointed out by the android developer documentation, R8 might run into issues when the library calls JNI code. More here: Shrink, obfuscate, and optimize your app | Android Developers
Give that a try and let me know if that works for you.