apply plugin: \'com.android.application\'
android {
compileSdkVersion 28
defaultConfig {
applicationId \"com.kaiboon0216gmail.homeownerstarterkit\"
Go to Admob - Select App - App Setting - App ID
copy the value from App ID
Now add this (change this android:value="paste the App ID value you copy from your admob app"
)
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-111100000000~1111111"/>
meta-data
into AndroidManifest.xml
file
No need to add anything in APPLICATION_ID
from android:name="com.google.android.gms.ads.APPLICATION_ID"
This will work!
See the picture below for clear understanding
Because with "com.google.android.gms:play-services-ads:17.1.1" You need to update something.
You have to Update your AndroidManifest.xml
<manifest>
<application>
<meta-data
android:name="com.google.android.gms.ads.AD_MANAGER_APP"
android:value="true"/>
</application>
</manifest>
And with this:
<manifest>
<application>
<!-- Sample AdMob App ID: ca-app-pub-3940256099942544~3347511713 -->
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="[ADMOB_APP_ID]"/>
</application>
</manifest>
You can check these links for more detail informations.
https://developers.google.com/ad-manager/mobile-ads-sdk/android/quick-start#update_your_androidmanifestxml
https://developers.google.com/admob/android/quick-start#update_your_androidmanifestxml
Otherwise You have to use "com.google.android.gms:play-services-ads:16.0.0"
Use "com.google.android.gms:play-services-ads:16.0.0", the new 17.1.1 change some code implementation, ie, you need do that in ur source too, or back to 16.0.0 for now...
will fix your error for while...