Setting SDK / NDK Path in CI

Hello,

I’m getting this error when building. “[Build] Can’t find the Android NDK/SDK path, please go to Preferences → External Programs to set”

How do I tell cocos the NDK/SDK path from the command line?

Since it’s a headless, I can’t open the creator. I’ve tried setting “sdkPath” and “ndkPath” in my build configuration but they have no effect.

I’m trying to configure my project to compile in a headless (CI/CD) environment.

Thanks!
Al

I encountered the same problem in the CI environment. Have you solved it?

Before running your build command, set the following environment variables:
export ANDROID_HOME=/path/to/android-sdk
export ANDROID_SDK_ROOT=/path/to/android-sdk
export ANDROID_NDK_HOME=/path/to/android-ndk
export NDK_ROOT=/path/to/android-ndk
Make sure to replace /path/to/android-sdk and /path/to/android-ndk with the actual locations of your SDK and NDK.