更新时间:2022-03-26 21:35:05
将ndk移至defaultConfig范围.也许,您也想添加sourceSets.main范围
Move the ndk to the defaultConfig scope. Maybe, you'll want to add the sourceSets.main scope too
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.guitarv.www.ndktest"
minSdkVersion 17
targetSdkVersion 23
versionCode 1
versionName "1.0"
ndk {
moduleName = "HelloJNI"
}
sourceSets.main {
jni.srcDirs = []
jniLibs.srcDir "src/main/libs"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}