【发布时间】:2016-01-27 17:02:19
【问题描述】:
我正在按照指南 http://tools.android.com/tech-docs/new-build-system/gradle-experimental 更新我的 gradle 配置以使用 ndk。
- 插件版本:0.6.0-alpha5
- Gradle 版本:2.10
更改后,我收到错误:
Gradle sync failed: Cause: com.android.build.gradle.managed.AndroidConfig$Impl
这是我的 build.gradle。我是不是忘记了什么或者做错了什么?
apply plugin: 'com.android.model.application'
model {
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.appid"
minSdkVersion.apiLevel 19
targetSdkVersion.apiLevel 23
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles.add(file('proguard-android.txt'))
proguardFiles.add(file('proguard-rules.pro'))
}
}
ndk {
moduleName "ImageProc"
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
// JSON serialization
compile 'com.google.code.gson:gson:2.4'
// Network
compile 'com.squareup.retrofit:retrofit:2.0.0-beta3'
compile 'com.squareup.retrofit:converter-gson:2.0.0-beta2'
compile 'com.squareup.okhttp3:okhttp:3.0.0-RC1'
// Junit
testCompile 'org.robolectric:robolectric:3.0'
}
【问题讨论】:
-
未找到解决方案。放弃了。
标签: android gradle android-ndk