【问题标题】:Problems in values.xml to update appcompat-v7:21values.xml 中更新 appcompat-v7:21 的问题
【发布时间】:2015-01-07 10:01:17
【问题描述】:

我知道有类似的问题,但没有一个答案能解决我的问题。 这是升级到版本 21 时的error

在 \appcompat-v7\21.0.0\res\values-v11 和 values-v7 \values.xml 错误:找不到与给定名称匹配的资源:attr 'android:actionModeShareDrawable'。

在 \appcompat-v7\21.0.0\res\values-v21\values.xml 错误:找不到与给定名称匹配的资源:attr 'android:overlapAnchor'。

这是我的 build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion '21.1.1'
    defaultConfig {
        minSdkVersion 15
        targetSdkVersion 21
        renderscriptTargetApi 21
        renderscriptSupportMode true
        ...
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('prog uard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}

repositories {
    maven { url "http://dl.bintray.com/populov/maven" }
    mavenCentral()
    maven { url 'http://JRAF.org/static/maven/2' }
}



dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:21.0.0'
    compile 'com.android.support:support-v4:21. 0.0'
    compile 'com.android.support:recyclerview-v7:+'
    compile 'com.android.support:cardview-v7:21.0.0'
    compile 'com.google.android.gms:play-services:6.1.11'
    compile 'com.android.support:gridlayout-v7:21.0.0'

    compile 'com.github.chrisbanes.photoview:library:1.2.3'
    compile 'com.jakewharton:butterknife:5.1.0'
    compile 'com.github.johnkil.android-appmsg:appmsg:1.2.0'
    compile 'com.github.flavienlaurent.datetimepicker:library:0.0.2'

}

还有我的 sdk 经理 有任何想法吗?谢谢

【问题讨论】:

  • 你在compile 'com.android.support:support-v4:21. 0.0'有一个额外的空间。不知道是否有帮助。
  • 谢谢,但不是这样 :(
  • 你的Android L api现在是21???我有最新的,L 只有 20。试试 Android 5.0 (API 21),应该会有所帮助。 link

标签: android updates android-appcompat


【解决方案1】:

重新安装android studio和sdk,问题就解决了

【讨论】:

    【解决方案2】:

    将您的 android 和 SDK 更新到最新版本,在 SDK 中安装 Intel x86 Atom _64 System ImageIntel x86 Atom System Imagebase 在您的操作系统(x86/32 位或 x64/64 位)上。如果您使用的是 Google API,请安装 Google API Intel x86 Atom _64 System ImageIntel x86 Atom System Image

    希望对您有所帮助。

    【讨论】:

      猜你喜欢
      • 2014-12-14
      • 2015-08-26
      • 1970-01-01
      • 2023-04-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多