【Unity】AndroidのAdmob実装でビルドエラーが出た時の対処法


環境メモ
⭐️Mac OS Mojave バージョン10.14.4
⭐️Unity 2019.1.19f1
⭐️AndroidStudio3.2.1
⭐️Android8.1.0

AndroidのAdmob実装で、ビルドエラー「Build failure」が発生した時、以下の実装が出来ているかを確認する

Build failure
1 exception was raised by workers: See the Console for details.

1.依存関係の設定が出来てる事を確認する。
「Assets」ー「Play Services Resolver」ー「Android Resolver」ー「Resolve」を選択している事を確認する

2.Admob App IDにアプリIDが入ってる事を確認する。
「GoogleMobileAds」ー「Resources」のGoogleMobileAdsSettings.assetを選択し、
EnabledをチェックONする。
Admob App IDにアプリIDを入れる。

3.AndroidManifestの設定にアプリIDが入っている事を確認する
「Assets」ー「Plugins」ー「Android」ー「GoogleMobileAdsPlugin」ー「AndroidManifest.xml」


<?xml version="1.0" encoding="utf-8"?>
<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>
    <uses-library android:required="false" android:name="org.apache.http.legacy" />
    <!-- Your AdMob App ID will look similar to this sample ID: ca-app-pub-★★★★~★★★★ -->
    <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-★★★★~★★★★" />
  </application>
</manifest>

Mobile Ads Unityの実装方法は、以下のサイトに手順が記載されています。
https://developers.google.com/admob/unity/start?hl=ja

以上です。




↓↓Google Play 無料Free
VR ダイアモンド クラッシュゲーム〜VR Diamond Crash Game

↓↓パソコンで遊ぶ(UnityRoom)無料Free
https://unityroom.com/games/diamondpc




↓↓Google Play 無料Free
VR ピヨくまちゃんのシューティング〜VR Shooting Piyo-Kuma-Chan