【发布时间】:2016-09-23 21:47:46
【问题描述】:
我决定将我的 api 级别从 23 降低到 22。首先,我下载了安装了最新 23 API 的 android studio。我现在安装了 22 API,但我不知道我是否安装了其他东西,例如:
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:design:22.2.0'
如果安装了这些,找不到在哪里查看...所以这就是我的清单的样子:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22 //changed this, used to be 23
buildToolsVersion "22.0.0" //changed this also, but I don't know if it's installed....
defaultConfig {
applicationId "xxx"
minSdkVersion 16
targetSdkVersion 22
versionCode 11
versionName "2.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets { main { java.srcDirs = ['src/main/java', 'libs'] } }
}
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile('com.twitter.sdk.android:tweet-composer:1.0.2@aar') {
transitive = true;
}
compile 'com.android.support:multidex:1.0.0'
compile 'com.android.support:appcompat-v7:22.2.0'//changed this also, but I don't know if it's installed....
compile 'com.android.support:design:22.2.0'//changed this also, but I don't know if it's installed....
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.facebook.android:facebook-android-sdk:4.+'
compile 'com.google.android.gms:play-services-identity:8.4.0'
}
所以当我尝试同步时,它给了我这个废话:
C:\Users\jonathan\AndroidStudioProjects\TrashOmeter\app\build\intermediates\res\merged\debug\values-v23\values-v23.xml 错误:(18) 检索项目的父项时出错:未找到与给定名称“android:Widget.Material.Button.Colored”匹配的资源。 错误:(3) 检索项目的父项时出错:未找到与给定名称“android:TextAppearance.Material.Widget.Button.Inverse”匹配的资源。 错误:任务 ':app:processDebugResources' 执行失败。
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\jonathan\AppData\Local\Android\sdk\build-tools\22.0. 0\aapt.exe'' 以非零退出值 1 结束
如何让它正确编译22个sdk???
【问题讨论】:
标签: android build sdk compiler-errors version