我已将eclipse安卓项目迁移到安卓工作室,其中targetSdkVersion
19。现在,我将targetSdkVersion
更改为23.现在问题是添加{{1}后Gradle显示错误进入依赖。
com.android.support:appcompat-v7:23.0.1
我的app.gradle文件:
apply plugin:'com.android.application'
Information:Gradle tasks [:app:clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:assembleDebug]
C:\Users\madhanhere\stories-android\app\build\intermediates\res\merged\debug\values\values.xml
Error:(190) Attribute "theme" has already been defined
Error:(190) Attribute "theme" has already been defined
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
Information:BUILD FAILED
values.xml文件:
android {
compileSdkVersion 23
buildToolsVersion "21.0.1"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.ebooks.stories"
minSdkVersion 18
targetSdkVersion 23
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile files('libs/core.jar')
compile files('libs/logentries-android-2.1.2.jar')
compile files('libs/picasso-2.2.0.jar')
compile 'com.google.android.gms:play-services:5.+'
compile 'com.facebook.android:facebook-android-sdk:3.+'
compile 'com.android.support:appcompat-v7:23.0.1'
}
如何解决这个问题?
答案 0 :(得分:0)
我忘了更新img
和play-services version
。我通过将更新buildToolsVersion
更改为
play-serivces
和com.google.android.gms:play-services:6.1.+
到
buildToolsVersion