세상사는 이야기 / 도움이 되었다면 배너 클릭 부탁드려요~ →→→

2019년 1월 3일 목요일

[Unity Android] Admob - The Google Mobile Ads SDK was initialized incorrectly.

[Unity Android] Admob - The Google Mobile Ads SDK was initialized incorrectly.

Unity Admob SDK 추가 후 에러 발생
AdMob AppID를 설정하지 않아서 발생하는 에러로 AndroidManifest.xml파일에 AppID 추가 하면 된다.

아래 에러에 나와있는 링크를 보면 해당 설명을 따라하면된다.
https://goo.gl/fQ2neu




GoogleMoblieAdsPlugin 폴더 AndroidManifest.xml파일 AppID 추가

Assets/Plugins/Android/GoogleMobileAdsPlugin/AndroidManifest.xml
  • APPLICATION_ID 추가
<?xml version="1.0" encoding="utf-8"?>
<!--
This Google Mobile Ads plugin library manifest will get merged with your
application's manifest, adding the necessary activity and permissions
required for displaying ads.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.google.unity.ads"
    android:versionName="1.0"
    android:versionCode="1">
  <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="19" />
  <application>
    <!-- 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="ca-app-pub-3940256099942544~3347511713"/>
  </application>
</manifest>




 --------- beginning of crash
01-03 17:50:47.600 14108-14108/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.kor.mysf, PID: 14108
    java.lang.RuntimeException: Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider: java.lang.IllegalStateException:
 
    ******************************************************************************
    * The Google Mobile Ads SDK was initialized incorrectly. AdMob publishers    *
    * should follow the instructions here: https://goo.gl/fQ2neu to add a valid  *
    * App ID inside the AndroidManifest. Google Ad Manager publishers should     *
    * follow instructions here: https://goo.gl/h17b6x.                           *
    ******************************************************************************
 
 
        at android.app.ActivityThread.installProvider(ActivityThread.java:5041)
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:4633)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4573)
        at android.app.ActivityThread.access$1500(ActivityThread.java:153)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1366)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:135)
        at android.app.ActivityThread.main(ActivityThread.java:5293)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
     Caused by: java.lang.IllegalStateException:
 
    ******************************************************************************
    * The Google Mobile Ads SDK was initialized incorrectly. AdMob publishers    *
    * should follow the instructions here: https://goo.gl/fQ2neu to add a valid  *
    * App ID inside the AndroidManifest. Google Ad Manager publishers should     *
    * follow instructions here: https://goo.gl/h17b6x.                           *
    ******************************************************************************
 
 
        at com.google.android.gms.internal.ads.zzze.attachInfo(Unknown Source)
        at com.google.android.gms.ads.MobileAdsInitProvider.attachInfo(Unknown Source)
        at android.app.ActivityThread.installProvider(ActivityThread.java:5038)
        ... 11 more

댓글 없음:

댓글 쓰기