0
我剛剛升級過Android Studio 2.0版本,我得到以下錯誤消息與同步的搖籃工程「的HelloWorld」失敗:異常而執行模型規則拋出:NdkComponentModelPlugin.Rules#createNativeBuildModel
同步與搖籃項目 '的HelloWorld' 失敗:異常而執行模型規則拋出:NdkComponentModelPlugin.Rules#createNativeBuildModel
構建文件看起來像
apply plugin: "com.android.model.application"
model {
android {
compileSdkVersion = 15
buildToolsVersion = "23.0.2"
defaultConfig.with {
applicationId = "com.test.helloworld"
minSdkVersion.apiLevel = 15
targetSdkVersion.apiLevel = 15
}
}
android.sources {
main {
jniLibs {
source {
srcDirs "libs"
}
}
}
}
android.buildTypes {
release {
minifyEnabled = true
proguardFiles.add(file('proguard-rules.txt'))
}
debug {
minifyEnabled = false
ndk.with {
debuggable = true
}
}
}
}
dependencies {
compile files('libs/xxx.jar')
compile files('libs/xxx1.jar')
}