<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: JNI DETECTED ERROR IN APPLICATION: JNI FindClass called with pending exception java.lang.ClassNotFoundException: Didn't find class &amp;quot;com.esri.arcgisruntime.ArcGISRuntimeEnvironment&amp;quot; in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/jni-detected-error-in-application-jni-findclass/m-p/330435#M2172</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/368312" target="_blank"&gt;Shylendra Madda&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;Have you tried setting R8 to false?&lt;/P&gt;&lt;P&gt;Such as:&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="color: #000080; border: 0px; font-weight: bold; font-size: 16px;"&gt;android.enableR8 &lt;/SPAN&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;false

&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;As pointed out by the android developer documentation, R8 might run into issues when the library calls JNI code. More here:&amp;nbsp;&lt;A class="link-titled" href="https://developer.android.com/studio/build/shrink-code#keep-code" title="https://developer.android.com/studio/build/shrink-code#keep-code" rel="nofollow noopener noreferrer" target="_blank"&gt;Shrink, obfuscate, and optimize your app &amp;nbsp;|&amp;nbsp; Android Developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Give that a try and let me know if that works for you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 15:38:50 GMT</pubDate>
    <dc:creator>Erick_1</dc:creator>
    <dc:date>2021-12-11T15:38:50Z</dc:date>
    <item>
      <title>JNI DETECTED ERROR IN APPLICATION: JNI FindClass called with pending exception java.lang.ClassNotFoundException: Didn't find class "com.esri.arcgisruntime.ArcGISRuntimeEnvironment"</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/jni-detected-error-in-application-jni-findclass/m-p/330434#M2171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I enabled R8 in my application in `gradle.properties` file&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;android.enableR8 &lt;/SPAN&gt;= &lt;SPAN style="color: #008000; font-weight: bold;"&gt;true&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;along with this I enabled these in app-level build.gradle&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro" style="background: #f6f6f6; border-width: 0px 0px 0px 2px; border-style: initial initial initial solid; border-color: initial initial initial #cccccc; font-weight: inherit; font-size: 16px; margin: 10px 0px; padding: 10px 20px;"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;release {
minifyEnabled &lt;SPAN style="color: #000043; border: 0px; font-weight: bold; font-size: 16px;"&gt;true
&lt;/SPAN&gt;shrinkResources &lt;SPAN style="color: #000043; border: 0px; font-weight: bold; font-size: 16px;"&gt;true
&lt;/SPAN&gt;zipAlignEnabled &lt;SPAN style="color: #000043; border: 0px; font-weight: bold; font-size: 16px;"&gt;true
&lt;/SPAN&gt;}&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;/PRE&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I have tried to add the following things to keep these at run time.&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro" style="background: #f6f6f6; border-width: 0px 0px 0px 2px; border-style: initial initial initial solid; border-color: initial initial initial #cccccc; margin: 10px 0px; padding: 10px 20px;"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #000080; border: 0px; font-weight: bold; font-size: 16px;"&gt;-keep &lt;/SPAN&gt;class com.esri.** {&lt;SPAN style="color: #660e7a; border: 0px; font-weight: bold; font-size: 16px;"&gt; *; &lt;/SPAN&gt;}
&lt;SPAN style="color: #000080; border: 0px; font-weight: bold; font-size: 16px;"&gt;-keep &lt;/SPAN&gt;interface com.esri.** {&lt;SPAN style="color: #660e7a; border: 0px; font-weight: bold; font-size: 16px;"&gt; *; &lt;/SPAN&gt;}
&lt;SPAN style="color: #000080; border: 0px; font-weight: bold; font-size: 16px;"&gt;-keep &lt;/SPAN&gt;class org.codehaus.jackson.** {&lt;SPAN style="color: #660e7a; border: 0px; font-weight: bold; font-size: 16px;"&gt; *; &lt;/SPAN&gt;}
&lt;SPAN style="color: #000080; border: 0px; font-weight: bold; font-size: 16px;"&gt;-dontwarn &lt;/SPAN&gt;org.codehaus.jackson.map.ext.**
&lt;SPAN style="color: #000080; border: 0px; font-weight: bold; font-size: 16px;"&gt;-dontwarn &lt;/SPAN&gt;jcifs.http.**&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Reference:&amp;nbsp;&lt;A href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F34787925%2Fcom-esri-arcgis-androidarcgis-android10-2-6-2-with-proguard" style="color: #287433; border: 0px; font-weight: inherit; text-decoration: none; padding: 0px calc(12px + 0.35ex) 0px 0px;" target="_blank"&gt;com.esri.arcgis.android:arcgis-android:10.2.6-2 with proguard - Stack Overflow&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;But still am facing the same issue.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Error message when I run the app:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro" style="background: #f6f6f6; border-width: 0px 0px 0px 2px; border-style: initial initial initial solid; border-color: initial initial initial #cccccc; margin: 10px 0px; padding: 10px 20px;"&gt;&lt;P style="border: 0px; font-weight: inherit;"&gt;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&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Can you please help me with this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:38:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/jni-detected-error-in-application-jni-findclass/m-p/330434#M2171</guid>
      <dc:creator>ShylendraMadda1</dc:creator>
      <dc:date>2021-12-11T15:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: JNI DETECTED ERROR IN APPLICATION: JNI FindClass called with pending exception java.lang.ClassNotFoundException: Didn't find class "com.esri.arcgisruntime.ArcGISRuntimeEnvironment"</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/jni-detected-error-in-application-jni-findclass/m-p/330435#M2172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/368312" target="_blank"&gt;Shylendra Madda&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;Have you tried setting R8 to false?&lt;/P&gt;&lt;P&gt;Such as:&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="color: #000080; border: 0px; font-weight: bold; font-size: 16px;"&gt;android.enableR8 &lt;/SPAN&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;false

&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;As pointed out by the android developer documentation, R8 might run into issues when the library calls JNI code. More here:&amp;nbsp;&lt;A class="link-titled" href="https://developer.android.com/studio/build/shrink-code#keep-code" title="https://developer.android.com/studio/build/shrink-code#keep-code" rel="nofollow noopener noreferrer" target="_blank"&gt;Shrink, obfuscate, and optimize your app &amp;nbsp;|&amp;nbsp; Android Developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Give that a try and let me know if that works for you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:38:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/jni-detected-error-in-application-jni-findclass/m-p/330435#M2172</guid>
      <dc:creator>Erick_1</dc:creator>
      <dc:date>2021-12-11T15:38:50Z</dc:date>
    </item>
  </channel>
</rss>

