3
3

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 5 years have passed since last update.

UnityのAndroidビルド時に「Gradle prewarm failed」が発生する

Last updated at Posted at 2019-04-01

環境

  • macOS 10.14.3
  • Unity 2018.3.3f

経緯

Unity 2018.2.2fで、Androidビルドは問題なくできていた。
Unityのバージョンを上げるためUnity Hub経由で2018.3.3fをインストールした。
すると、下記「Android SDK is outdated」エラーが発生するようになった。

D1aLYB-V4AA8TXT.jpeg

この状態で、「Update Android SDK」を押しても結果的に何も現象は変わらず、「Use Highest Installed」を押すとビルド自体は問題なく行われた。

常にこのダイアログが出るのが嫌だったので、SDK ManagerでSDKとToolsのバージョンアップを行った。
その結果「Android SDK Build-Tools 29-rc1」がインストールされた。

この状態でAndoridビルドを行うと「Gradle prewarm failed」のエラーが発生し、ビルドできない状態になった。Gradleを使用せず、Internalでのビルドを行うと成功する状態。

対応

SDK ManagerのSDK Toolsの画面で、いったんSDK Build-Toolsをアンインストールした。次に、「Show Package Details」にチェックを入れて、SDK Toolsの28.0.3を明示的にインストールした。
最初の「Android SDK is outdated」のエラーも出なくなり、Gradleでのビルドも成功するようになった。

スクリーンショット 2019-04-01 22.08.35.png

教訓

SDK Managerの「Show Package Details」を使うと、Toolsのバージョンを細かく指定可能。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?