#StackBounty: #android #unity3d #crash #admob #android-9.0-pie Android 9 Pie crash (com.google.android.gms… ClassNotFoundException)

Bounty: 150

I have a Unity3D game published on Android, and it have worked well so far.
However, the Android Vitals Dashboard is now reporting a lot of crashes. Here’s the detailed info:

By Android version: Android 9   4500    100.0%

Stacktrace:

java.lang.Error: FATAL EXCEPTION [Thread-360]
Unity version     : 2017.3.1p3
Device model      : Google Pixel
Device fingerprint: google/sailfish/sailfish:9/PQ2A.190305.002/5240760:user/release-keys
Caused by
  at lt.b (com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:2)
  at ls.a (com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:1)
  at lu.a (com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:18)
  at com.google.android.gms.ads.internal.util.ar.a (com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:10)
  at kx.a (com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:7)
  at kx.run (com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:2)
Caused by: java.lang.ClassNotFoundException: 
  at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:134)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:379)
  at ac.loadClass (com.google.android.gms.dynamite_dynamiteloader@16089081@16.0.89 (100400-239467275):4)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:312)

My AndroidResolverDependencies.xml file:

<dependencies>
  <packages>
    <package>com.android.support:customtabs:[26.0.0, 27.2.0[</package>
    <package>com.android.support:support-v4:[26.0.0, 27.2.0[</package>
    <package>com.google.android.gms:play-services-ads:17.2.0</package>
    <package>com.google.android.gms:play-services-analytics:11.8.0</package>
    <package>com.google.android.gms:play-services-base:[10.2.1, 12.1.0[</package>
    <package>com.google.android.gms:play-services-location:[10.2.1, 12.1.0[</package>
    <package>com.google.firebase:firebase-messaging:[10.2.1, 12.1.0[</package>
  </packages>
  <files>
    <file>Assets/Plugins/Android/android.arch.core.common-1.1.0.jar</file>
    <file>Assets/Plugins/Android/android.arch.core.runtime-1.1.0.aar</file>
    <file>Assets/Plugins/Android/android.arch.lifecycle.common-1.1.0.jar</file>
    <file>Assets/Plugins/Android/android.arch.lifecycle.livedata-core-1.1.0.aar</file>
    <file>Assets/Plugins/Android/android.arch.lifecycle.runtime-1.1.0.aar</file>
    <file>Assets/Plugins/Android/android.arch.lifecycle.viewmodel-1.1.0.aar</file>
    <file>Assets/Plugins/Android/com.android.support.customtabs-27.1.1.aar</file>
    <file>Assets/Plugins/Android/com.android.support.support-annotations-27.1.1.jar</file>
    <file>Assets/Plugins/Android/com.android.support.support-compat-27.1.1.aar</file>
    <file>Assets/Plugins/Android/com.android.support.support-core-ui-27.1.1.aar</file>
    <file>Assets/Plugins/Android/com.android.support.support-core-utils-27.1.1.aar</file>
    <file>Assets/Plugins/Android/com.android.support.support-fragment-27.1.1.aar</file>
    <file>Assets/Plugins/Android/com.android.support.support-media-compat-27.1.1.aar</file>
    <file>Assets/Plugins/Android/com.android.support.support-v4-27.1.1.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-ads-17.2.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-ads-base-17.2.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-ads-identifier-16.0.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-ads-lite-17.2.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-analytics-16.0.8.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-analytics-impl-16.0.8.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-base-16.1.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-basement-16.2.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-gass-17.2.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-location-16.0.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-measurement-base-16.3.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-measurement-sdk-api-16.3.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-places-placereport-16.0.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-stats-16.0.1.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-tagmanager-v4-impl-16.0.8.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-tasks-16.0.1.aar</file>
    <file>Assets/Plugins/Android/com.google.auto.value.auto-value-annotations-1.6.jar</file>
    <file>Assets/Plugins/Android/com.google.firebase.firebase-common-16.1.0.aar</file>
    <file>Assets/Plugins/Android/com.google.firebase.firebase-iid-17.1.2.aar</file>
    <file>Assets/Plugins/Android/com.google.firebase.firebase-iid-interop-16.0.1.aar</file>
    <file>Assets/Plugins/Android/com.google.firebase.firebase-measurement-connector-17.0.1.aar</file>
    <file>Assets/Plugins/Android/com.google.firebase.firebase-messaging-17.6.0.aar</file>
  </files>
</dependencies>
Target API level: 28
Minimum API level: 16

I’ve seen a similar thread in Google AdMob’s discussion group suggesting to add the following to the AndroidManifest.xml file:

<uses-library android:name="org.apache.http.legacy" android:required="false" />

However:

  1. I’m not sure the problem is caused by any apache-related API.
  2. I’m afraid this will restrict the number of installs in my app since it will be available to a smaller audience in Google Play due to the uses-library declaration.


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.