UnityMediationAdapter (v4.12.1.0) failed to initialize with proguard minify enabled

29 views
Skip to first unread message

caro...@gmail.com

unread,
Aug 4, 2024, 11:08:36 PMAug 4
to Google Mobile Ads SDK Developers
Here are the message on init complete:

Key = com.google.android.gms.ads.MobileAds, State = READY, Desc = , Latency = 918
Key = com.google.ads.mediation.applovin.AppLovinMediationAdapter, State = READY, Desc = , Latency = 2090
Key = com.google.ads.mediation.unity.UnityMediationAdapter, State = NOT_READY, Desc = Failed to initialize adapter. com.google.ads.mediation.unity.UnityMediationAdapter does not implement the initialize() method., Latency = 58

I'm using Android Studio Jellyfish 2023.3.1 Patch 2, AGP 8.4.2, Gradle 8.6,
with proguard rules:
-keep public class com.google.android.gms.** { public *; }
-keep public class com.google.ads.** { public *; }
-keepattributes *Annotation*
-dontobfuscate

Ads-related dependencies are:
implementation 'com.google.android.gms:play-services-ads:23.2.0'
implementation 'com.google.ads.mediation:applovin:12.6.0.0'
implementation 'com.unity3d.ads:unity-ads:4.12.1'
implementation 'com.google.ads.mediation:unity:4.12.1.0'

I also use Firebase in the project:
classpath 'com.google.gms:google-services:4.4.2'
classpath 'com.google.firebase:firebase-crashlytics-gradle:3.0.2'

implementation platform('com.google.firebase:firebase-bom:33.1.2')
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-crashlytics'

As can be seen in the log message I pasted, applovin adapter works as intended. Also if I disabled proguard minify, the adapters all initialize correctly. Please help me pinpoint the issue. Thanks!

Mobile Ads SDK Forum Advisor

unread,
Aug 5, 2024, 5:19:16 AMAug 5
to caro...@gmail.com, google-adm...@googlegroups.com

Hi,

Thank you for contacting the Mobile Ads SDK Support team.

Each third-party ad source SDK adapter needs to be explicitly initialized in your codebase with the necessary parameters. Kindly refer to the Understand SDK adapter issues.

I am experiencing difficulties in the process of creating mediation in Unity.

Could you kindly provide the following information privately so that we can review it and attempt to recreate the issue? Following doing so, we will be better equipped to offer a solution. 

  • Sample project reproducing the issue
  • Video recordings of the issue

If the file(s) you are looking to share are less than 25mb in total you can attach them to this case on your next reply. If you are having trouble attaching your file to this case or if your file(s) are larger than 25mb, you can share your files via reply to author option or by performing the following steps:

1. Navigate to

https://docs.google.com/forms/d/e/1FAIpQLSfkAiXMeYP-fw1W3Z-tT9uwmATEKO5X6S-th0gR2ezdKaaqfg/viewform?usp=pp_url&entry.400550049=Mobile+Ads+SDK&entry.460850823=5004Q00002vEXvNQAW&entry.80707362=00260857

2. Fill out all fields and attach your file(s).

3. Please reply on this thread when you have uploaded your file(s). Please do not share this link. 

This message is in relation to case "ref:!00D1U01174p.!5004Q02vEXvN:ref" (ADR-00260857)

Thanks,
 
Google Logo Mobile Ads SDK Team


Reply all
Reply to author
Forward
0 new messages