小编and*_*fog的帖子

How to disable Android NDK build for some build variant

I am using Android Studio 2.2 and have setup Gradle to build c/c++ sources with NDK via CMake.

Now I would like to disable NDK build for buildType "debug". For buildType "release" I would like to keep it.

The goal is to make NDK sources compile on the build server (using "release") but disable it for developers (using "debug").

This is the build.gradle file currently in use:

android {
    externalNativeBuild {
        cmake {
            path "CMakeLists.txt"
        }
    }

    defaultConfig {
        externalNativeBuild …
Run Code Online (Sandbox Code Playgroud)

c++ android-ndk build.gradle android-gradle-plugin gradle-plugin

5
推荐指数
1
解决办法
2589
查看次数