That folder is up-to-date, in the sense that it’s just configuration files and source files (both C++ and Java). The changes in here aren’t directly related to CMake, but rather to your Android project.
Android Studio will automatically update the temporary build files using CMake any time it detects a changes in one of your build configuration files (like CMakeLists.txt or gradle.build etc).
The ndk.dir
field in local.properties
is deprecated, and the NDK should be set in your /app/build.gradle
file, exactly as it is indicating in the log. For example:
...
repositories {
google()
}
android {
compileSdkVersion PROP_COMPILE_SDK_VERSION.toInteger()
ndkVersion "22.0.7026061"
defaultConfig {
...
It will automatically find the correct version of the NDK, as long as it is exactly where it expects it to be, in [android sdk folder]/sdk/ndk/[ndk folder named as version number, must match ndkVersion in build.gradle]
.
Now, the warning you see with the 32-bit architecture is related to this in gradle.properties
:
# List of CPU Archtexture to build that application with
# Available architextures (armeabi-v7a | arm64-v8a | x86)
# To build for multiple architexture, use the `:` between them
# Example - PROP_APP_ABI=armeabi-v7a:arm64-v8a:x86
PROP_APP_ABI=armeabi-v7a:arm64-v8a
If you add “x86” to that list, then you must also add the 64 bit version, but, it won’t work with Cocos2d-x because the x86_64 3rd party libraries are missing. There are very few x86/x86_64 devices out there, so personally, I don’t think you should be concerned about that. If you really want to support the x86_64 architecture, then you’ll have to build the 3rd party libraries from source yourself.
To get rid of that warning, just change it to this:
PROP_APP_ABI=armeabi-v7a:arm64-v8a