iTranslated by AI
The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
✨
[Unity] Resolving the "ANDROID_NDK_ROOT is undefined or empty" error
Conclusion
- Select an appropriate folder in File → Build Settings → Export and try building once.
- This will enable you to build.
- Or refer to the following article:
- Open Preferences and in "External Tools,"
uncheck "Android NDK Installed with Unity (recommended)" and then
check it again before running the Android build. This successfully completed the build. - https://baba-s.hatenablog.com/entry/2022/11/10/131216
- Open Preferences and in "External Tools,"
Situation
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:
Error
Attempting to run the Unity build from the editor (script)
- Instead of the standard File → Build Settings → Export, I was trying to build using BuildPipeline via a script.
Others
- NDK/SDK already installed in Unity
- Had never performed an Android build before
Environment
- M1 MacBook Pro
- macOS Sonoma
Solution
- Select an appropriate folder via File → Build Settings → Export and try building once
Discussion