✨
【Unity】ANDROID_NDK_ROOT is undefined or empty
結論
- File→Build Settings→Export で適当なフォルダを選択し、一度ビルドしてみる
- するとビルドができるようになる
- もしくは以下の記事
- Preferences を開いて「External Tools」の
「Android NDK Installed with Unity (recommended)」のチェックを一度オフにしてから
オンにし直して Android ビルドしたら正常にビルドが完了した - https://baba-s.hatenablog.com/entry/2022/11/10/131216
- Preferences を開いて「External Tools」の
状況
BuildFailedException: Burst compiler (1.4.11) failed running
stdout:
Burst requires the android NDK to be correctly installed (it can be installed via the unity installer add component) in order to build a standalone player for Android with ARMV7A_NEON32
The environment variable ANDROID_NDK_ROOT is undefined or empty, is the Android NDK correctly installed?
stderr:
Error building Player: BuildFailedException: Burst compiler (1.4.11) failed running
stdout:
Burst requires the android NDK to be correctly installed (it can be installed via the unity installer add component) in order to build a standalone player for Android with ARMV7A_NEON32
The environment variable ANDROID_NDK_ROOT is undefined or empty, is the Android NDK correctly installed?
stderr:
エラー
Unityのビルドをエディタ(スクリプト)から実行しようとしていた
- 通常のFile→Build Settings→Exportではなく、BuildPipelineを使ってスクリプトでビルドをしようとしていた。
その他
- UnityでNDK SDK導入済み
- Androidのビルドは一度もしたことが無し
環境
- M1 MacBook Pro
- Mac OS Sonoma
対処法
- File→Build Settings→Export で適当なフォルダを選択し、一度ビルドしてみる
Discussion