AppLovin MAX
Android アプリケーションでメディエーションに使用していますが、以下のようなバナー広告を追加しようとすると
void createBannerView(View view){
final String bannerAdUni = getString(R.string.bannerAdUnits);
adView = new MaxAdView(bannerAdUni,getActivity());
ViewGroup viewGroup = view.findViewById(R.id.content);
adView.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.BOTTOM));
viewGroup.addView(adView);
adView.loadAd();
}
実行時に次のエラーが発生しました
AppLovinSdk: [DataCollector] Could not collect Google Advertising ID - this will negatively impact your eCPMs! Please integrate the Google Play Services SDK into your application. More info can be found online at http://developer.android.com/google/play-services/setup.html. If you're sure you've integrated the SDK and are still seeing this message, you may need to add a ProGuard exception: -keep public class com.google.android.gms.** { public protected *; }
java.io.IOException: java.util.concurrent.TimeoutException: Timed out waiting for the service connection
at com.google.android.gms.ads.identifier.AdvertisingIdClient.zza(Unknown Source:16)
at com.google.android.gms.ads.identifier.AdvertisingIdClient.zza(Unknown Source:25)
at com.google.android.gms.ads.identifier.AdvertisingIdClient.getAdvertisingIdInfo(Unknown Source:47)
at com.applovin.impl.sdk.m.c(Unknown Source:15)
at com.applovin.impl.sdk.m.j(Unknown Source:2)
at com.applovin.impl.sdk.m.a(Unknown Source:84)
at com.applovin.impl.sdk.m.a(Unknown Source:11)
at com.applovin.impl.sdk.m.a(Unknown Source:7)
at com.applovin.impl.sdk.EventServiceImpl.a(Unknown Source:24)
at com.applovin.impl.sdk.EventServiceImpl.a(Unknown Source:0)
at com.applovin.impl.sdk.EventServiceImpl$1.run(Unknown Source:29)
at com.applovin.impl.sdk.e.y.run(Unknown Source:2)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.util.concurrent.TimeoutException: Timed out waiting for the service connection
at com.google.android.gms.common.BlockingServiceConnection.getServiceWithTimeout(com.google.android.gms:play-services-basement@@17.5.0:13)
at com.google.android.gms.ads.identifier.AdvertisingIdClient.zza(Unknown Source:4)
at com.google.android.gms.ads.identifier.AdvertisingIdClient.zza(Unknown Source:25)
at com.google.android.gms.ads.identifier.AdvertisingIdClient.getAdvertisingIdInfo(Unknown Source:47)
at com.applovin.impl.sdk.m.c(Unknown Source:15)
at com.applovin.impl.sdk.m.j(Unknown Source:2)
at com.applovin.impl.sdk.m.a(Unknown Source:84)
at com.applovin.impl.sdk.m.a(Unknown Source:11)
at com.applovin.impl.sdk.m.a(Unknown Source:7)
at com.applovin.impl.sdk.EventServiceImpl.a(Unknown Source:24)
at com.applovin.impl.sdk.EventServiceImpl.a(Unknown Source:0)
at com.applovin.impl.sdk.EventServiceImpl$1.run(Unknown Source:29)
at com.applovin.impl.sdk.e.y.run(Unknown Source:2)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Google Play サービス SDK を追加するなど、ほとんどの解決策を試しましたが、Android エミュレーターとリアル デバイスの両方でまだ問題が発生します。以下は、使用している依存関係のリストです
dependencies {
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
/*---------- APPLOvIN -------*/
implementation 'com.applovin:applovin-sdk:+'
implementation 'com.applovin.mediation:vungle-adapter:6.10.2.0'
implementation 'com.applovin.mediation:facebook-adapter:+'
implementation 'com.facebook.android:facebook-android-sdk:12.1.0'
implementation 'com.google.android.gms:play-services-ads-identifier:17.1.0'
implementation 'androidx.ads:ads-identifier:1.0.0-alpha04'
// Used for the calls to addCallback() in the snippets on this page.
implementation 'com.google.guava:guava:28.0-android'
implementation 'com.android.volley:volley:1.2.1'
implementation 'com.google.code.gson:gson:2.8.9'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:2.0.4'
implementation 'com.google.android.gms:play-services-auth-base:17.1.4'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core :3.4.0'}
ProGuard Exception
上記のstackTraceの指示に従って追加しました
SDK を統合したにもかかわらず、このメッセージがまだ表示される場合は、ProGuard 例外を追加する必要がある可能性があります。}
今までどうすればいいのかわかりません.. AppLovinに関連する問題ですか? 解決するにはどうすればよいですか?