【问题标题】:No resource found that matches the given name error in android after updating android studio and build tools更新 android studio 和构建工具后,找不到与 android 中的给定名称错误匹配的资源
【发布时间】:2016-12-22 11:11:15
【问题描述】:

将我的 android studio 更新到 2.2 preview 4 版本后,我遇到了这个错误:

Error:(93, 54) No resource found that matches the given name (at 'android:actionModeCloseDrawable' with value '@drawable/abc_ic_ab_back_mtrl_am_alpha').

我的 build.gradle (app) 是:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion '25.0.2'

    defaultConfig {
        applicationId "android.arisa.kalahroodfinal"
        minSdkVersion 17
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        vectorDrawables.useSupportLibrary = true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
android {
    useLibrary 'org.apache.http.legacy'
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile('cn.trinea.android.view.autoscrollviewpager:android-auto-scroll-view-pager:1.1.2') {
        exclude module: 'support-v4'
    }
    compile('com.afollestad.material-dialogs:core:0.8.1.0@aar') {
        transitive = true
    }
    compile('com.afollestad.material-dialogs:commons:0.8.1.0@aar') {
        transitive = true
    }
    compile files('/Users/Bmaster/AndroidStudioProjects/KalahroodFinal/libraries/jsoup-1.9.1.jar')
    compile 'com.android.support:design:25.1.0'
    compile 'com.android.support:appcompat-v7:25.1.0'
    compile 'com.android.support:support-v4:25.1.0'
    compile 'com.google.android.gms:play-services:9.6.1'
/*
    compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha1'
*/
    testCompile 'junit:junit:4.12'
}

repositories {
    maven { url "https://jitpack.io" }
    mavenCentral()
    jcenter()
}

我使用:classpath 'com.android.tools.build:gradle:2.2.2' 我已将构建工具更改为 23 版本,但我已经出现该错误!

【问题讨论】:

    标签: android gradle android-studio-2.2


    【解决方案1】:

    @drawable/abc_ic_ab_back_mtrl_am_alpha 替换为@drawable/abc_ic_ab_back_material

    此资源已在此库中删除,请参阅 this

    资源 Update support library 23.2.0 build bug Question还有其他搜索结果解释

    【讨论】:

    • tnx 用于回答,但我该如何替换!!!单击错误 v11/values-v11.xml 打开后,我无法将 @drawable/abc_ic_ab_back_mtrl_am_alpha 的名称更改为 @drawable/abc_ic_ab_back_material
    • 欢迎您,试试 toolbar.setNavigationIcon(R.drawable.abc_ic_ab_back_material);告诉我你得到了什么
    猜你喜欢
    • 2016-07-07
    • 1970-01-01
    • 2015-05-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多