LoginSignup
1
2

More than 3 years have passed since last update.

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

Posted at

環境メモ
⭐️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.

003.png

1.依存関係の設定が出来てる事を確認する。
「Assets」ー「Play Services Resolver」ー「Android Resolver」ー「Resolve」を選択している事を確認する
スクリーンショット 2019-09-11 22.03.38.png

2.Admob App IDにアプリIDが入ってる事を確認する。
「GoogleMobileAds」ー「Resources」のGoogleMobileAdsSettings.assetを選択し、
EnabledをチェックONする。
Admob App IDにアプリIDを入れる。
スクリーンショット 2019-09-11 21.52.26.png

3.AndroidManifestの設定にアプリIDが入っている事を確認する
「Assets」ー「Plugins」ー「Android」ー「GoogleMobileAdsPlugin」ー「AndroidManifest.xml」
スクリーンショット 2019-09-11 22.10.21.png

スクリーンショット 2019-09-11 21.46.30.png


<?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
diamondvr1.png

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




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

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2