0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Unity でAdmob + FAN のmediation を実装すると gradle failed となって build できない時の対処法。

Posted at

先日、初めて Unity に Admob を利用した メディエーションを実装しました。

Admob + Facebook Audience Network でメディエーションを実装することにしましたが、Android に ビルドする際にgradle failedとなってエラーになるのでその対応方法を示します。

英語で読める方は以下のリンク先から解決できます。https://answers.unity.com/questions/1784106/applovinmax-inmobi-adapter-failes-the-build-with-g.html

実装までに至るファイルのインポートや設定は、Admob公式リファレンスの通りに行えば良いです。

以下では、あくまでビルドエラーの対応に絞って示します。

バージョン

Unity

 2019.4.19f1
Admob

 GoogleMobileAds-v5.4.0
Fan mediation

 GoogleMobileAdsFacebookMediation-2.11.1

EasyMobilePro

 current 2/16

対応方法

① PlayerSetting >minimum API Level -> Android 5.0
image.png

②PlayerSetting > Build > Custom Base Gradle Template -> Check
image.png

2021/6/17 Update
PlayerSetting > Build > Custom Main Gradle Template -> Check
PlayerSetting > Build > Custom Base Gradle Template -> Check
PlayerSetting > Build > Custom Gradle Properties Template -> Check

image.png

③ Open ‘baseProjectTemplate.gradle’

  convert classpath ‘com.android.tools.build:gradle:3.4.0’

  to   classpath ‘com.android.tools.build:gradle:3.4.3′

image.png

以上です、お疲れ様です。

(多分admob が求めているgradle のバージョンと Unity のそれとがマッチしていないから)

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?