Updating ndk on v3 project

Has anyone tried updating ndk to newer versions?

I’m trying to update from ndk 17.2.4988734 to 21.3.6528147. This also meant updating gradle plugin, gradle and android studio.

Build process breaks on Android.mk on this line:

include $(BUILD_SHARED_LIBRARY)

With error:

2020-12-09T17:32:50.789-0300 [LIFECYCLE] [com.android.build.gradle.internal.cxx.services.CxxProcessService] fcntl(): Bad file descriptor
2020-12-09T17:32:50.790-0300 [LIFECYCLE] [com.android.build.gradle.internal.cxx.services.CxxProcessService] /Users/nin/Library/Android/sdk/ndk/21.3.6528147/build/core/build-module.mk:34: *** missing separator.  Stop.

Anyone has any idea whats going on? I tried a bunch of stuff with no luck sources files and includes (used in Android.mk) seem to be the same as before the update.

1 Like

No one?

It seems updating ndk will be necesarry if we want to support new android apis? Maybe I’m wrong on this, if someone could clarify this I’d be thankful.

@slackmoehrle?

I have yet to update and to be honest I just test our products on android. I don’t develop for android.

@R101 is knowledgeable here I believe and we can also seek help from engineering

@bolin After you upgraded the NDK, did you delete all existing generated build folders? Folders like .gradle, .cxx and build. If you haven’t, then do that, and try it again.

Also, have you considered switching over to CMake builds? It’ll make things easier for you. I myself no longer use ndk-build for any project (Cocos2d-x 3.17+), and any related build script code for it have been stripped out of the gradle build files in my projects.

1 Like

Yes, I’ve tried deleting all the generated folders with no luck :frowning:
Changing the project over to cmake/whatever new way there is to build ndk projects was on my list. Will try this next week and update this thread.

Thanks!