Unable to make android bundle (errors with gradle on make)

I’ve been following Publish to Native Platforms · Cocos Creator and I did struggle a bit with getting my project to build but I was able to fix my first few issues by downgrading to jdk11, and manually install ndk21 through cmdline-tools sdkmanager. I’m able to complete the “build” step fine, but I get issues at the “make” step.

The error I get is as follows:

* What went wrong:
A problem occurred configuring project ':NewProject_1'.
> NDK at C:\Users\Lamim\AppData\Local\Android\Sdk did not have a source.properties file

I attempted to fix it myself by trying this NDK at ~/Library/Android/sdk/ndk-bundle did not have a source.properties file - Stack Overflow, so I added my ndk version to myprojectfolder\build\android\proj\libservice\build.gradle which in turn gave me a new error as follows:

* What went wrong:
A problem occurred configuring project ':NewProject_1'.
> SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at 'C:\Users\Lamim\NewProject_1\build\android\proj\local.properties'.

So I tried making the environment variable. Which didn’t work. So I tried following this android - SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable - Stack Overflow and adding it manually to my local.properties file. Which is now giving me another error…

* What went wrong:
A problem occurred configuring project ':NewProject_1'.
> NDK at C:\Users\Lamim\AppData\Local\Android\Sdk did not have a source.properties file

I do have multiple NDK’s installed, including 21, ndk-bundle (v22), and 25. My cocos creator is configured to use 21, as follows:

Full log file here: android8-17-2022 20-48.log - Pastes.io

Edit: Uninstalling my other NDK versions didn’t help or fix anything.

Edit2: Tried a fresh clean install of cocos creator 3.6, and a new clean build then make. Same issue. Here’s the full log: android8-18-2022 16-05.log - Pastebin.com

The configured path of NDK& SDK seems reversed

1 Like

You’re right. I’m surprised I didnt catch that. Spent hours trying to fix it without realizing it lmao.