Ad failed to load : 2 | Ads not loaded on Physical Device (Android TV)

52 views
Skip to first unread message

Shubham Chauhan

unread,
Feb 10, 2025, 4:03:25 PM2/10/25
to Google Mobile Ads SDK Developers

I am trying to load ads on Android TV Platform.

Code Used: 

MobileAds.initialize(this) {}
val testDeviceIds = Arrays.asList("Device Test ID")
val configuration = RequestConfiguration.Builder().setTestDeviceIds(testDeviceIds).build()
MobileAds.setRequestConfiguration(configuration)


val adView = AdManagerAdView(this@ABCActivity)
adView.setAdSizes(AdSize.getInlineAdaptiveBannerAdSize(1920, 1080))
adView.adUnitId = adUnit
binding.adView.setVisibility(View.GONE)
binding.playerAdView.addView(adView)
val request = AdManagerAdRequest.Builder().build()
adView.loadAd(request)
adView.adListener = object : AdListener() {
override fun onAdLoaded() {
Toast.makeText(this@
ABCActivity,"Add Success : ",Toast.LENGTH_LONG)
.show()

}

override fun onAdFailedToLoad(adError: LoadAdError) {
// Code to be executed when an ad request fails.
Toast.makeText(this@
ABCActivity,"Add Error : "+adError.code,Toast.LENGTH_LONG)
.show()
}

override fun onAdOpened() {

}

override fun onAdClicked() {

}

override fun onAdClosed() {

}
}


<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-ID"/> "ID is different"

<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>


I am getting the below error from Google Ads SDK:

Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:244410203

2025-02-10 13:51:31.036  3857-3885  DynamiteModule          com.ads.example              I  Selected remote version of com.google.android.gms.ads.dynamite, version >= 244410203

2025-02-10 13:51:31.978  3857-3857  DynamiteModule          com.ads.example              I  Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:244410203

2025-02-10 13:51:31.983  3857-3857  DynamiteModule          com.ads.example              I  Selected remote version of com.google.android.gms.ads.dynamite, version >= 244410203

2025-02-10 13:51:31.989  3857-3857  DynamitePackage         com.ads.example              D  Instantiating com.google.android.gms.ads.ChimeraMobileAdsSettingManagerCreatorImpl

2025-02-10 13:51:32.783  3857-3857  Ads                     com.ads.example              I  Updating ad debug logging enablement.

2025-02-10 13:51:33.345  3857-3985  Ads                     com.ads.example              W  Update ad debug logging enablement as false

2025-02-10 13:51:34.803  3857-3857  Ads                     com.ads.example              I  JS: The jsLoaded GMSG has been sent (https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/production/sdk-core-v40-impl.html:857)

2025-02-10 13:51:54.414  3857-3857  DynamitePackage         com.ads.example              D  Instantiating com.google.android.gms.ads.ChimeraAdManagerCreatorImpl

2025-02-10 13:51:54.473  3857-3857  Ads                     com.ads.example              I  This request is sent from a test device.

2025-02-10 13:51:55.099  3857-587   ConnectionStatusConfig  com.ads.example              W  Dynamic lookup for intent failed for action: com.google.android.gms.ads.service.START

2025-02-10 13:51:55.358  3857-566   GmsClient               com.ads.example              W  IGmsServiceBroker.getService failed

                                                                                                    android.os.DeadObjectException: Transaction failed on small parcel; remote process probably died

                                                                                                    at android.os.BinderProxy.transactNative(Native Method)

                                                                                                    at android.os.BinderProxy.transact(BinderProxy.java:540)

                                                                                                    at m.avr.s(:com.google.android.gms.policy_ads_fdr_dynamite@244410211@244410203017.691591528.691591528:203)

                                                                                                    at m.avo.a(:com.google.android.gms.policy_ads_fdr_dynamite@244410211@244410203017.691591528.691591528:14)

                                                                                                    at m.avq.c(:com.google.android.gms.policy_ads_fdr_dynamite@244410211@244410203017.691591528.691591528:7)

                                                                                                    at m.avh.d(:com.google.android.gms.policy_ads_fdr_dynamite@244410211@244410203017.691591528.691591528:7)

                                                                                                    at m.avk.handleMessage(:com.google.android.gms.policy_ads_fdr_dynamite@244410211@244410203017.691591528.691591528:276)

                                                                                                    at android.os.Handler.dispatchMessage(Handler.java:106)

                                                                                                    at m.bbw.a(:com.google.android.gms.policy_ads_fdr_dynamite@244410211@244410203017.691591528.691591528:1)

                                                                                                    at m.bbw.dispatchMessage(:com.google.android.gms.policy_ads_fdr_dynamite@244410211@244410203017.691591528.691591528:1)

                                                                                                    at android.os.Looper.loop(Looper.java:223)

                                                                                                    at android.os.HandlerThread.run(HandlerThread.java:67)

2025-02-10 13:52:55.156  3857-3857  Ads                     com.ads.example              I  Ad failed to load : 2

Reply all
Reply to author
Forward
0 new messages