且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在 Android Studio 1.3 中配置 NDK 项目

更新时间:2023-01-01 13:24:59

在你的 build.gradle(module) 中,android.buildTypes 块需要在 android 之外> 阻止.所以它应该是这样的:

In your build.gradle(module), the android.buildTypes block needs to outside of the android block. So it should look like this:

model {
    android {
        compileSdkVersion = 22
        buildToolsVersion = "23.0.0 rc3"

        defaultConfig.with {
            applicationId = "com.opaxlabs.nativetest"
            minSdkVersion.apiLevel =  15
            targetSdkVersion.apiLevel =  22
            versionCode = 1
            versionName = "1.0"
        }
    }
    android.buildTypes {
        release {
            minifyEnabled = false
            proguardFiles += file('proguard-rules.pro')
        }
    }
    android.ndk{
        moduleName = "native"
    }
}