googleads-mobile-unity icon indicating copy to clipboard operation
googleads-mobile-unity copied to clipboard

AdMob 7.1.0 & AppLovin 6.3.0 -> Crash on Android (Exoplayer)

Open dcosmin-97 opened this issue 3 years ago • 13 comments

Environment:

  • Unity version: 2020.3.35f1
  • Google Mobile Ads Unity plugin version: 7.0.2
  • Platform: Android
  • Platform OS version: 12
  • Mediation ad networks used, and their versions: -> AdColony 2.5.0 -> AppLovin 6.2.1 -> Facebook 3.7.0 -> Unity 3.2.0
  • Other SDK : Firebase 9.1.0
  • External Dependency Manager: 1.2.171

Problem: -> If you try to watch an ad from AppLovin, it will crash the app

Has anyone faced this issue and found a solution? Thank you!

dcosmin-97 avatar Jun 14 '22 10:06 dcosmin-97

Current AndroidResolver, maybe there is something missing:

<package>com.android.support:appcompat-v7:24.0.+</package>
<package>com.android.support:support-v4:26.1.+</package>
<package>com.google.ads.mediation:adcolony:4.7.0.0</package>
<package>com.google.ads.mediation:applovin:11.3.3.0</package>
<package>com.google.ads.mediation:facebook:6.10.0.0</package>
<package>com.google.ads.mediation:unity:4.2.1.0</package>
<package>com.google.android.gms:play-services-ads:21.0.0</package>
<package>com.google.android.gms:play-services-base:18.0.1</package>
<package>com.google.android.play:core:1.8.+</package>
<package>com.google.firebase:firebase-analytics:21.0.0</package>
<package>com.google.firebase:firebase-analytics-unity:9.1.0</package>
<package>com.google.firebase:firebase-app-unity:9.1.0</package>
<package>com.google.firebase:firebase-common:20.1.1</package>
<package>com.unity3d.ads:unity-ads:4.2.1</package>

<file>Assets/Plugins/Android/androidx.annotation.annotation-1.3.0.jar</file>
<file>Assets/Plugins/Android/androidx.annotation.annotation-experimental-1.1.0.aar</file>
<file>Assets/Plugins/Android/androidx.appcompat.appcompat-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.arch.core.core-common-2.1.0.jar</file>
<file>Assets/Plugins/Android/androidx.arch.core.core-runtime-2.1.0.aar</file>
<file>Assets/Plugins/Android/androidx.asynclayoutinflater.asynclayoutinflater-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.browser.browser-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.collection.collection-1.1.0.jar</file>
<file>Assets/Plugins/Android/androidx.coordinatorlayout.coordinatorlayout-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.core.core-1.6.0.aar</file>
<file>Assets/Plugins/Android/androidx.cursoradapter.cursoradapter-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.customview.customview-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.documentfile.documentfile-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.drawerlayout.drawerlayout-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.fragment.fragment-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.interpolator.interpolator-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.legacy.legacy-support-core-ui-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.legacy.legacy-support-core-utils-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.legacy.legacy-support-v4-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.lifecycle.lifecycle-common-2.1.0.jar</file>
<file>Assets/Plugins/Android/androidx.lifecycle.lifecycle-livedata-2.1.0.aar</file>
<file>Assets/Plugins/Android/androidx.lifecycle.lifecycle-livedata-core-2.1.0.aar</file>
<file>Assets/Plugins/Android/androidx.lifecycle.lifecycle-runtime-2.1.0.aar</file>
<file>Assets/Plugins/Android/androidx.lifecycle.lifecycle-service-2.1.0.aar</file>
<file>Assets/Plugins/Android/androidx.lifecycle.lifecycle-viewmodel-2.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.loader.loader-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.localbroadcastmanager.localbroadcastmanager-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.media.media-1.3.1.aar</file>
<file>Assets/Plugins/Android/androidx.print.print-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.recyclerview.recyclerview-1.2.1.aar</file>
<file>Assets/Plugins/Android/androidx.room.room-common-2.2.5.jar</file>
<file>Assets/Plugins/Android/androidx.room.room-runtime-2.2.5.aar</file>
<file>Assets/Plugins/Android/androidx.slidingpanelayout.slidingpanelayout-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.sqlite.sqlite-2.1.0.aar</file>
<file>Assets/Plugins/Android/androidx.sqlite.sqlite-framework-2.1.0.aar</file>
<file>Assets/Plugins/Android/androidx.startup.startup-runtime-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.swiperefreshlayout.swiperefreshlayout-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.tracing.tracing-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.vectordrawable.vectordrawable-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.vectordrawable.vectordrawable-animated-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.versionedparcelable.versionedparcelable-1.1.1.aar</file>
<file>Assets/Plugins/Android/androidx.viewpager.viewpager-1.0.0.aar</file>
<file>Assets/Plugins/Android/androidx.work.work-runtime-2.7.0.aar</file>
<file>Assets/Plugins/Android/com.adcolony.sdk-4.7.1.aar</file>
<file>Assets/Plugins/Android/com.applovin.applovin-sdk-11.4.2.aar</file>
<file>Assets/Plugins/Android/com.facebook.android.audience-network-sdk-6.11.0.aar</file>
<file>Assets/Plugins/Android/com.google.ads.mediation.adcolony-4.7.1.1.aar</file>
<file>Assets/Plugins/Android/com.google.ads.mediation.applovin-11.4.2.0.aar</file>
<file>Assets/Plugins/Android/com.google.ads.mediation.facebook-6.11.0.1.aar</file>
<file>Assets/Plugins/Android/com.google.ads.mediation.unity-4.2.1.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.exoplayer.exoplayer-2.15.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.exoplayer.exoplayer-common-2.15.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.exoplayer.exoplayer-core-2.15.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.exoplayer.exoplayer-dash-2.15.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.exoplayer.exoplayer-extractor-2.15.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.exoplayer.exoplayer-hls-2.15.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.exoplayer.exoplayer-rtsp-2.15.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.exoplayer.exoplayer-smoothstreaming-2.15.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.exoplayer.exoplayer-transformer-2.15.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.exoplayer.exoplayer-ui-2.15.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-ads-21.0.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-ads-base-21.0.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-ads-identifier-18.0.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-ads-lite-21.0.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-appset-16.0.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-base-18.0.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-basement-18.0.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-measurement-21.0.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-measurement-api-21.0.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-measurement-base-21.0.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-measurement-impl-21.0.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-measurement-sdk-21.0.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-measurement-sdk-api-21.0.0.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-stats-17.0.2.aar</file>
<file>Assets/Plugins/Android/com.google.android.gms.play-services-tasks-18.0.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.play.core-1.8.3.aar</file>
<file>Assets/Plugins/Android/com.google.android.ump.user-messaging-platform-2.0.0.aar</file>
<file>Assets/Plugins/Android/com.google.firebase.firebase-analytics-21.0.0.aar</file>
<file>Assets/Plugins/Android/com.google.firebase.firebase-analytics-unity-9.1.0.aar</file>
<file>Assets/Plugins/Android/com.google.firebase.firebase-annotations-16.0.0.jar</file>
<file>Assets/Plugins/Android/com.google.firebase.firebase-app-unity-9.1.0.aar</file>
<file>Assets/Plugins/Android/com.google.firebase.firebase-common-20.1.1.aar</file>
<file>Assets/Plugins/Android/com.google.firebase.firebase-components-17.0.0.aar</file>
<file>Assets/Plugins/Android/com.google.firebase.firebase-installations-17.0.1.aar</file>
<file>Assets/Plugins/Android/com.google.firebase.firebase-installations-interop-17.0.1.aar</file>
<file>Assets/Plugins/Android/com.google.firebase.firebase-measurement-connector-19.0.0.aar</file>
<file>Assets/Plugins/Android/com.google.guava.failureaccess-1.0.1.jar</file>
<file>Assets/Plugins/Android/com.google.guava.guava-27.1-android.jar</file>
<file>Assets/Plugins/Android/com.google.guava.listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar</file>
<file>Assets/Plugins/Android/com.unity3d.ads.unity-ads-4.2.1.aar</file>
<file>Assets/Plugins/Android/org.jetbrains.annotations-13.0.jar</file>
<file>Assets/Plugins/Android/org.jetbrains.kotlin.kotlin-stdlib-1.5.31.jar</file>
<file>Assets/Plugins/Android/org.jetbrains.kotlin.kotlin-stdlib-common-1.5.31.jar</file>

dcosmin-97 avatar Jun 14 '22 10:06 dcosmin-97

@dcosmin-97 Can you submit the error / exception message?

NVentimiglia avatar Jun 15 '22 15:06 NVentimiglia

@dcosmin-97 Can you submit the error / exception message?

I think the adapter needs update for Google Mobile Ads SDK version 21.0.0.

Will come back with all the details.

dcosmin-97 avatar Jun 15 '22 16:06 dcosmin-97

I have updated to the following:

Unity version: 2020.3.36f1
Google Mobile Ads Unity plugin version: 7.1.0
Platform: Android
Platform OS version: 12
Mediation ad networks used, and their versions:
-> AdColony 2.5.0
-> AppLovin 6.3.0
-> Facebook 3.7.0
-> Unity 3.2.1
Other SDK : Firebase 9.1.0
External Dependency Manager: 1.2.171

The crash is still present when I try to watch an ad from AppLovin. Here you can see the logs: crash_1

Here is everything related to exoplayer in my Android Dependencies Manifest:

<file>Assets/Plugins/Android/com.google.android.exoplayer.exoplayer-2.15.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.exoplayer.exoplayer-common-2.15.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.exoplayer.exoplayer-core-2.15.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.exoplayer.exoplayer-dash-2.15.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.exoplayer.exoplayer-extractor-2.15.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.exoplayer.exoplayer-hls-2.15.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.exoplayer.exoplayer-rtsp-2.15.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.exoplayer.exoplayer-smoothstreaming-2.15.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.exoplayer.exoplayer-transformer-2.15.1.aar</file>
<file>Assets/Plugins/Android/com.google.android.exoplayer.exoplayer-ui-2.15.1.aar</file>

Is there any temporary workaround? Thank you!

dcosmin-97 avatar Jun 17 '22 20:06 dcosmin-97

@dcosmin-97 please tag me if you find a workaround. Exoplayer3 issue is making me anxious

Rickard87 avatar Jun 18 '22 14:06 Rickard87

I have the same problem

tongledi avatar Jun 18 '22 15:06 tongledi

@Rickard87 @tongledi I found a solution on the internet and it is working for me:

Go to Project Settings -> Player -> Publishing Settings and enable Custom Gradle Properties Template After ADDITIONAL_PROPERTIES line, add the following:

android.enableDexingArtifactTransform=false

I don't know if this will affect anything else, but for the moment it is working.

dcosmin-97 avatar Jun 18 '22 16:06 dcosmin-97

@dcosmin-97 Thank you! I will try this out tomorrow

Rickard87 avatar Jun 18 '22 17:06 Rickard87

This solution does seem to work for us, when viewing AppLovin ads through the mediation test suite. Without it, the ads would load, but trying to view them would crash the game.

android.enableDexingArtifactTransform=false

I'd still be cool if this was fixed by default in a future version of this plugin.

PokerDawg avatar Jun 23 '22 10:06 PokerDawg

@dcosmin-97 that seems to work for me thank you @PokerDawg really? I don't have any crashes from it

Rickard87 avatar Jun 23 '22 12:06 Rickard87

@Rickard87 Yes, in the mediation test suite, without the solution above, AppLovin ads would always load, but would crash the game when trying to watch them with the same error @dcosmin-97 posted in his screenshot.

PokerDawg avatar Jun 24 '22 14:06 PokerDawg

@PokerDawg oh yes I understand. Since you are using Applovin mediation. Would you mind walking me through the setup? Bidding works but Waterfall doesn't. ("Can't retrieve data"). At your convenience of course

Rickard87 avatar Jun 24 '22 14:06 Rickard87

@Rickard87 We're not using waterfall ads, only bidding.

  • Unity v2021.3.4
  • AdMob plugin v7.1.0
  • AppLovin mediation plugin v6.3.0
  • Mediation Test Suite (latest)

I'm also using UnityAds, IronSource and Facebook mediation, but I don't think it's relevant here. Just set up the AdMob plugin like usual, make sure it work fine in a build, import all the mediation plugins and the mediation test suite, force resolve, build again. At this point for us, AppLovin ads (bidding) load, but crash the game when opening. If I add the line into the Custom Gradle Properties, force resolve, and build again, AppLovin ads (bidding) open without issues.

PokerDawg avatar Jun 27 '22 05:06 PokerDawg

@Rickard87 @tongledi I found a solution on the internet and it is working for me:

Go to Project Settings -> Player -> Publishing Settings and enable Custom Gradle Properties Template After ADDITIONAL_PROPERTIES line, add the following:

android.enableDexingArtifactTransform=false

I don't know if this will affect anything else, but for the moment it is working.

I was using this patch, but it doesn't seem to be compatible with the latest Google Mobile Ads Unity plugin (v.7.3.1)

I'm having this error at compiling time: java.lang.NoClassDefFoundError: com/android/tools/lint/client/api/Vendor_

So I had to removed the patch, but according to this post: https://stackoverflow.com/a/61573110/3046594, the issue should have been fixed if we are using a more recent version of Gradle.

dhamelin avatar Dec 05 '22 14:12 dhamelin

We are still looking into these issues.

b/270634126 for reference.

NVentimiglia avatar Feb 24 '23 02:02 NVentimiglia

@NVentimiglia How to get into the reference b/270634126? (I am new to github)

DoryRyu avatar Feb 24 '23 02:02 DoryRyu

Hi @DoryRyu this is an internal reference. We are working on the issue, let us know if you have additional details or findings.

NVentimiglia avatar Feb 24 '23 23:02 NVentimiglia

Hi, Nicholas.

I am so glad to hear it's fixed. Is there any necessary update from my side? Such as the version update of google ads.

Thanks in advance.

2023년 3월 17일 (금) 오전 10:05, Nicholas Ventimiglia @.***>님이 작성:

Closed #2091 https://github.com/googleads/googleads-mobile-unity/issues/2091 as completed.

— Reply to this email directly, view it on GitHub https://github.com/googleads/googleads-mobile-unity/issues/2091#event-8773305791, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6C7DTPXHQR5LR2GP6NPKS3W4O2GFANCNFSM5YXEFR7A . You are receiving this because you were mentioned.Message ID: @.*** .com>

DoryRyu avatar Mar 17 '23 01:03 DoryRyu