LoginSignup
3

More than 5 years have passed since last update.

UnityでAndroid apkを生成しようとするとGradleエラーで失敗するときの対処法

Last updated at Posted at 2018-05-17

UnityでAndroid apkを生成しようとすると下記のようなエラーが出てapkの生成に失敗しました。

対処方法

Failed to find Build Tools revision 28.0.0と書いてあるので、まずAndroid SDKのバージョンを確認します。

最新バージョンは28-rc2であるため、28.0.0でビルドしようとすると失敗します。そこで、Plugins/Android/にgradleファイルを作って、buildToolsVersionを指定します。

  1. UnityでFile -> Build Settings -> PlayerSettingsを選択し、Publish SettingsCustom Gradle Templateにチェックを入れます。
  2. Plugins/Android/mainTemplate.gradleを開いてbuildToolsVersionを変更します。
buildToolsVersion '27'

以上です。

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
3