<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<!-- view for AdMob Banner Ad -->
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
ads:adSize="BANNER"
ads:adUnitId="@string/banner_ad_unit_id"/>
</RelativeLayout>
MobileAds.initialize(this){}
// Load an ad into the AdMob banner view.
val adRequest = AdRequest.Builder()
//.setRequestAgent("android_studio:ad_template")
.build()
adView.loadAd(adRequest)
implementation 'com.google.android.gms:play-services-ads:18.1.1'<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="@string/myadmob_app_id"/>
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="@android:style/Theme.Translucent"/>
Hello Pratik,
Just to understand, you want to only integrate Mobile Ads SDK and not Firebase SDK and having issues while uploading the PlayStore? The Mobile Ads SDK is no longer bundled with Firebase and is a standalone as of now. You do not require Firebase to be integrated. I don't notice any specific issues with your code snippets. But why are you declaring both the AppID and as an AdManager App? Are you using both AdMob and AdManager to serve ads? Also, can you send us a minified version of your app along with your Ad unit Id for us to debug this further? You can use "Reply Privately to Author" option to share the details privately.
Regards,
Deepika Uragyaala
Mobile Ads SDK Team
Hello Pratik,
The AppID is required to be integrated in the Manifest otherwise it would fail. My query here is are you using both AdMob and AdManager in your project? But an AppID needs to be declared in the Manifest if not it will fail. Sounds like you are trying to do so without it. If you're using Ad Manager, you will need to specify the GADIsAdManagerApp to true for iOS applications in your Info.plist. For Android applications you will need to make changes to the AndroidManifest.xml as mentioned in this guide. If you're loading AdMob ads explicitly, then the App ID is required.
Regards,
Deepika Uragayala
Mobile Ads SDK Team
Hello there,
I'm simply unable to reproduce any issue with our sample apps . Can you try with them again and then let us know? If you are unable to, then can you send us your sample app and will then be able to look into this further. You can use "Reply Privately to Author" option to share the details privately.
Regards,
Deepika Uragayala
Mobile Ads SDK Team