AdMob integration without using Firebase, Missing google_app_id. Firebase Analytics disabled.

3,144 views
Skip to first unread message

Pratik Nandha

unread,
Jul 29, 2019, 6:48:51 AM7/29/19
to google-adm...@googlegroups.com
Hello,

I am creating new app with latest Android compileSDK and want to integrate Admob Ad to my App. I don't want Firebase integration so I just used only Admob library in my application nothing else.
I am following Banner Ads example and in that also mention that without Firebase you can integrate Admob Ad and serve in your application.
As to display testing Ad it's working file while after generating sign APK and run than Admob Ad not display getting error as below

GoogleService failed to initialize, status: 10, Missing google app id value from from string resources with name google_app_id.
Missing google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI
Uploading is not possible. App measurement disabled
Tag Manager is not found and thus will not be used
Ad failed to load : 3

My code as below 

XML
<?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>

Kotlin
MobileAds.initialize(this){}
// Load an ad into the AdMob banner view.
val adRequest = AdRequest.Builder()
//.setRequestAgent("android_studio:ad_template")
.build()
adView.loadAd(adRequest)

build.gradle
implementation 'com.google.android.gms:play-services-ads:18.1.1'

AndroidManifest.xml
<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"/>

Is it Firebase required for new application? For existing my application want required Firebase App and never asking for google_app_id

Mobile Ads SDK Forum Advisor Prod

unread,
Jul 29, 2019, 3:42:30 PM7/29/19
to pratik....@gmail.com, google-adm...@googlegroups.com

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



ref:_00D1U1174p._5001UEGySR:ref

Pratik Nandha

unread,
Aug 1, 2019, 9:49:54 AM8/1/19
to Google Mobile Ads SDK Developers
Yes, I know that AdMob and Firebase are working individual as in my other apps I just used Admob only. But now I am creating new app using Kotlin in that I have only integrated Admob. Regarding AppID its required to mention in manifestfile otherwise app is crashing AdManager code just getting from my existing app.

You can try with below steps
- Create new project without Activity
- Create Activity with AdMob code
- Peplace testing Ad Unit ID with your any running Unit ID. Also remove the addTestDevice line
- Run the application

I have tried also and getting same result

Thanks 

Mobile Ads SDK Forum Advisor Prod

unread,
Aug 1, 2019, 3:23:13 PM8/1/19
to pratik....@gmail.com, google-adm...@googlegroups.com

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


 

ref:_00D1U1174p._5001UEGySR:ref

Pratik Nandha

unread,
Aug 2, 2019, 7:26:27 AM8/2/19
to Google Mobile Ads SDK Developers
Forgot about the AdManager I have tried with and without code it's doesn't matter with the current issue. As I have mention the example link I just follow that to display Ad in my application.

Mobile Ads SDK Forum Advisor Prod

unread,
Aug 2, 2019, 3:32:00 PM8/2/19
to pratik....@gmail.com, google-adm...@googlegroups.com

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



ref:_00D1U1174p._5001UEGySR:ref
Reply all
Reply to author
Forward
0 new messages