这个问题是经过相当多的广泛研究后发布的,未能找到解决方案。当我尝试编译我的项目时,我收到此错误:
Error:(94, 54) No resource found that matches the given name (at 'android:actionModeCloseDrawable' with value '@drawable/abc_ic_ab_back_mtrl_am_alpha').
下面是我的build.gradle:
apply plugin: 'com.android.application'
ext {
supportLibVersion = '25.3.1'
}
android {
compileSdkVersion 25
buildToolsVersion '25.0.0'
defaultConfig {
applicationId "com.editor.photoeditor"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
dexOptions {
javaMaxHeapSize "4g"
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile "com.android.support:support-annotations:${supportLibVersion}"
compile "com.android.support:support-v4:${supportLibVersion}"
compile "com.android.support:appcompat-v7:${supportLibVersion}"
compile('com.afollestad.material-dialogs:core:0.8.1.0@aar') {
transitive = true
}
compile 'com.github.javiersantos:MaterialStyledDialogs:1.4.1'
compile 'com.github.darsh2:MultipleImageSelect:v0.0.4'
compile 'com.github.lopei:collageview:0.1.2'
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.android.gms:play-services:7.8.0'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.orhanobut:logger:1.11'
compile 'com.adobe.creativesdk.foundation:auth:0.3.94'
compile 'com.adobe.creativesdk:image:4.0.0'
compile 'com.github.QuadFlask:colorpicker:0.0.8'
compile 'com.squareup.okhttp:okhttp:2.3.0'
compile 'com.github.bumptech.glide:glide:3.6.1'
compile 'com.readystatesoftware.systembartint:systembartint:1.0.3'
compile 'com.melnykov:floatingactionbutton:1.3.0'
compile 'com.cocosw:bottomsheet:1.+@aar'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
}
到目前为止我一直在尝试:
1)清洁项目和重建项目
2)删除了构建文件夹和重建项目
3)升级,降级到我的build.gradle中给出的23.0.0和支持库的最终版本之间的所有可能版本。
4)几乎所有文章都已消失,大多数人都建议将变量@drawable/abc_ic_ab_back_mtrl_am_alpha
的名称更改为 R.drawable.abc_ic_ab_back_materia
,但因为它是<style name="MD_Dark" parent="Theme.AppCompat.Dialog.Alert">
样式并且问题仅在编译期间显示,因此,我也无法更改此项目的名称。
答案 0 :(得分:0)
通过将支持库版本更新到25.3.1解决了以下错误。更新支持库版本后,重建整个项目,之后不要同步gradle。只有同步build.gradle导致问题再次出现,所以每次同步gradle时都要重建整个项目。