【发布时间】:2018-03-17 00:52:33
【问题描述】:
我正在尝试构建一个具有 compileSdkVersion 25 和 targetSdkVersion 25 的项目,但我需要将两者都更改为 23,因此在更改 compileSdkVersion 23 和 targetSdkVersion 23 后出现错误
错误:资源 android:style/TextAppearance.Material.Widget.Button.Borderless.Colored 未找到。错误:资源 android:style/TextAppearance.Material.Widget.Button.Colored 未找到。 错误:链接引用失败。 错误:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception:AAPT2 错误:检查日志 详细信息错误:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception:AAPT2 错误:检查日志 详细信息错误:com.android.tools.aapt2.Aapt2Exception:AAPT2错误: 检查日志以获取详细信息错误:任务执行失败 ':app:processDebugResources'。
执行 aapt 失败
我是一名 iOS 开发人员,在 Android 方面没有太多经验,我无法在代码中找到此错误点以及如何修复。
编辑:1
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '26.0.2'
defaultConfig {
applicationId 'com.abc.app'
minSdkVersion 21
targetSdkVersion 23
versionCode 4
versionName '1.3'
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
buildConfigField("String", "API_KEY", "\"empty\"")
//buildConfigField("String", "API_KEY", API_KEY)
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
exclude 'META-INF/services/com.fasterxml.jackson.core.ObjectCodec'
exclude 'META-INF/services/com.fasterxml.jackson.core.JsonFactory'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.wang.avi:library:2.1.3'
implementation 'com.android.support:appcompat-v7:25.4.0'
implementation 'com.android.support:customtabs:25.4.0'
implementation 'com.android.support:cardview-v7:25.4.0'
implementation 'com.nex3z:toggle-button-group:1.1.2'
implementation 'com.github.ivbaranov:materialfavoritebutton:0.1.4'
implementation 'com.android.support:design:25.4.0'
implementation 'com.android.volley:volley:1.0.0'
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.2'
implementation 'com.yqritc:recyclerview-flexibledivider:1.2.9'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.google.code.gson:gson:2.8.1'
implementation 'com.github.bumptech.glide:glide:4.3.1'
implementation 'com.google.android.gms:play-services-ads:11.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.3.1'
implementation('com.github.fcopardo:easyrest:v1.4.2@aar') {
transitive = true
}
// compile 'com.github.wrdlbrnft:sorted-list-adapter:0.3.0.27'
testImplementation 'junit:junit:4.12'
}
【问题讨论】:
-
为什么要更改为
23版本? -
我尝试了各种解决方法,但只有 this one 帮助了我。
-
如果你因为一个 react-native 项目而来到这里,请查看 [this](stackoverflow.com/questions/50574492/…)
-
由于这个问题,DJI UX SDK 需要 >= 24。但由于包含的 ffmpeg 0x86 库无法处理 SDK > 23,因此无法编译。显然 DJI UX SDK 需要重写,支持的 mpeg lib 需要升级。