在构建AOSP的拨号器时找不到资源

时间:2015-02-15 23:42:39

标签: android android-studio

我从Google(https://android.googlesource.com/platform/packages/apps/Dialer/)克隆了拨号代码,将项目导入Android工作室,我在制作项目时遇到以下错误。

C:\Users\san16\Desktop\Dialer\app\src\main\res\values\styles.xml
Error:(33, 21) No resource found that matches the given name: attr 'activated_background'.
Error:(58, 21) No resource found that matches the given name: attr 'contact_browser_background'.
Error:(56, 21) No resource found that matches the given name: attr 'contact_browser_list_padding_left'.
and so on

其他stackoverflow线程建议在gradle中将compileSdkVersion更改为21,但我的已经是!

我的build.gradle:

apply plugin: 'com.android.application'
android {
    compileSdkVersion 21
    buildToolsVersion '21.1.2'
    defaultConfig {
        applicationId "com.android.dialer"
        testApplicationId "com.android.dialer.tests"
        testInstrumentationRunner "android.test.InstrumentationTestRunner"
        minSdkVersion 21
        targetSdkVersion 21
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
    productFlavors {
    }
}

dependencies {
}

帮助!

1 个答案:

答案 0 :(得分:1)

此res值是ContactsCommon的一部分 首先导入https://android.googlesource.com/platform/packages/apps/ContactsCommon/

并将其用作图书馆项目。