Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

ADMOB crashes my app

Discussion in 'Unity Ads' started by electr1on, May 18, 2019.

  1. electr1on

    electr1on

    Joined:
    Mar 21, 2018
    Posts:
    22
    Im using Unity 2017.3.0f3 and when I import ADMOB in my project and after that I build to my device and my game crash when I pass scene.
    I dont know what to do,I followed all the instructions on the web.
    I hope you will help me!

    Thanks all.
     
  2. PayandaOnline

    PayandaOnline

    Joined:
    May 5, 2018
    Posts:
    12
    go to project folder find "Plugins/Android/GoogleMobileAdsPlugin/androidmanifest.xml" file to open editor.
    change lines "[ADMOB APPLICATION ID]" to your admob app id.
    works fine !

    <!-- Your AdMob App ID will look similar to this sample ID: ca-app-pub-3940256099942544~3347511713 -->
    <meta-data
    android:name="com.google.android.gms.ads.APPLICATION_ID"
    android:value="[ADMOB APPLICATION ID]"/>
     
  3. macram69

    macram69

    Joined:
    Jul 29, 2019
    Posts:
    3
    when i add this line to manifest file
    <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="appID"/>

    the unity(Compiler) will automatic delete this line
    <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="appID"/>
     
  4. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,387
    You shouldn't need to manually modify your manifest. You can enter your app ID in the GoogleMobileAdsSettings asset under \GoogleMobileAds\Resources.
     
unityunity