错误:在<declare-styleable> FontFamilyFont中,无法找到属性android:font Apear更新SDK工具时

时间:2017-12-18 19:35:18

标签: android

即时重新启动android studio中的项目,所有com.android.anything和com.google.anything依赖项都无法解析,因此将SDK工具更新为更高版本并将maven {url "https://maven.google.com" }添加到存储库。错误已经解决,但是出现了新的错误:

Error:In <declare-styleable> FontFamilyFont, unable to find attribute android:font
Error:In <declare-styleable> FontFamilyFont, unable to find attribute android:fontWeight
Error:Execution failed for task ':app:processUniversalDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt

我的build.gradle依赖项部分:

android
        {
    compileSdkVersion 25
    buildToolsVersion '26.0.0'
    defaultConfig {

        manifestPlaceholders = [onesignal_app_id: "example id",
                                // Project number pulled from dashboard, local value is ignored.
                                onesignal_google_project_number: "REMOTE"]

        applicationId "com.example.example"
        minSdkVersion 15
        targetSdkVersion 25
        versionCode 7
        versionName "1.3"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    splits {
        abi {
            enable true
            reset()
            include 'armeabi', 'armeabi-v7a', 'x86'
            universalApk true
        }
    }
}
ext.versionCodes = [armeabi:1, 'armeabi-v7a':3, x86:6]

import com.android.build.OutputFile
android.applicationVariants.all { variant ->
    // assign different version code for each output
    variant.outputs.each { output ->
        int abiVersionCode = project.ext.versionCodes.get(output.getFilter(OutputFile.ABI)) ?: 0
        output.versionCodeOverride = (abiVersionCode * 1000) + android.defaultConfig.versionCode
    }
}

dependencies {
    compile 'com.android.support:cardview-v7:25.3.1'
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:recyclerview-v7:25.3.1'
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support:design:25.3.1'
    compile 'com.github.zcweng:switch-button:0.0.3@aar'
    compile 'com.google.android.gms:play-services-vision:10.0.1'
    compile 'co.ronash.android:pushe-base:1.2.0'
    compile 'com.onesignal:OneSignal:[3.5.8, 3.99.99]'
    compile 'com.android.support:customtabs:25.3.1'
    compile 'com.android.support:support-v4:25.3.1'
}

1 个答案:

答案 0 :(得分:0)

buildToolsVersion '26.0.0'需要google存储库

在主build.gradle中,添加:

buildscript {
    repositories {
        google()
        //...
    }

看看here