godotengine / godotengine/godot-cpp
"Required toolchain not found for platform" printed instead of more helpful errors such as "ANDROID_NDK_ROOT not set".
- Dominant language
- C++
- Stars
- 2.7k
- Forks
- 809
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 8
Description
I wanted to build my extension for Android, so I casually ran `scons p=android` assuming it would tell me what's wrong. Instead I got "Required toolchain not found for platform".
In `android.py`, the helpful error is only printed in `generate`, which is called after `exists` in `SConstruct`:
`SConstruct`:
```py
if tool is None or not tool.exists(env):
raise ValueError("Required toolchain not found for platform " + env["platform"])
tool.generate(env)
```
`android.py`:
```py
def exists(env):
if not "ANDROID_NDK_ROOT" in os.environ:
return False
return True
def generate(env):
if not "ANDROID_NDK_ROOT" in os.environ:
raise ValueError(
"To build for Android, ANDROID_NDK_ROOT must be defined. Please set ANDROID_NDK_ROOT to the root folder of your Android NDK installation."
)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.