Issue
I recently updated to Android Studio 3.6 and I get the following error while building my app which has C/C++ native modules:
/CMakeLists.txt : C/C++ release|armeabi-v7a : Waiting for type "handshake".
Affected Modules: MyC++Module
I have a gcc dependency and hence I am using a specific version of NDK which supports gcc.
From build.gradle:
android {
compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION)
buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION
ndkVersion project.ANDROID_BUILD_NDK_VERSION
From project settings:
ANDROID_BUILD_MIN_SDK_VERSION=17
ANDROID_BUILD_TARGET_SDK_VERSION=28
ANDROID_BUILD_SDK_VERSION=28
ANDROID_BUILD_TOOLS_VERSION=28.0.3
ANDROID_BUILD_NDK_VERSION=17.2.4988734
This error is seen when I build from terminal:
C/C++ debug|armeabi-v7a : Failed to activate protocol version: Generator "Android Gradle - Ninja" not supported.
externalNativeBuild {
cmake {
cppFlags "-std=c++11"
arguments "-DANDROID_STL=gnustl_static",
"-DANDROID_CPP_FEATURES=rtti exceptions",
"-DANDROID_TOOLCHAIN=gcc",
"-GAndroid Gradle - Ninja"
}
}
Solution
This worked for me:
externalNativeBuild {
cmake {
cppFlags "-std=c++11"
arguments "-DANDROID_STL=gnustl_static",
"-DANDROID_CPP_FEATURES=rtti exceptions",
"-DANDROID_TOOLCHAIN=gcc",
"-GNinja"
}
}
"-GAndroid Gradle - Ninja" is not supported anymore?
Answered By - ssk
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.