Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

ADMOB crashes my app

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

  1. electr1on

    electr1on

    Joined:
    Mar 21, 2018
    Posts:
    28
    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:
    13
    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,519
    You shouldn't need to manually modify your manifest. You can enter your app ID in the GoogleMobileAdsSettings asset under \GoogleMobileAds\Resources.
     
  5. RiyadhRiseUp

    RiyadhRiseUp

    Joined:
    May 29, 2022
    Posts:
    2
    If you still getting the same error, you probably put a extra space in the last of the application id.
     
  6. MITTAGE

    MITTAGE

    Joined:
    Aug 30, 2019
    Posts:
    2
    Entered app ID in the GoogleMobileAdsSettings asset but still the app crashes on AdMob importation. I think the AdMob package should be made straight forward. Sometimes it is terrible thing you can do on your project.