0

我正在尝试构建一个以前有效的应用程序。

这是错误消息:

Android resource linking failed
Output:  E:\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
E:\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
E:\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:1174: error: resource android:attr/fontVariationSettings not found.
E:\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:1175: error: resource android:attr/ttcIndex not found.
error: failed linking references.

Command: C:\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\a50b902eb6d2bdbd9e1a638d3c3bca74\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
        E:\Android\sdk\platforms\android-26\android.jar\
        --manifest\
        E:\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
        -o\
        E:\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
        -R\
        @E:\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
        --auto-add-overlay\
        --java\
        E:\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
        --custom-package\
        de.test.test\
        -0\
        apk\
        --output-text-symbols\
        E:\app\build\intermediates\symbols\debug\R.txt\
        --no-version-vectors
Daemon:  AAPT2 aapt2-3.2.1-4818971-windows Daemon #0

这些是构建等级

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath 'com.google.gms:google-services:+'
    }
}

allprojects {
    repositories {
        jcenter()
        google()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion '28.0.3'
    defaultConfig {
        applicationId "de.test.test"
        minSdkVersion 23
        targetSdkVersion 26
        versionCode 9
        versionName "Ginger"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:+'
    implementation 'com.android.support:design:+'
    implementation 'com.google.android.gms:play-services-ads:+'
    implementation 'com.google.firebase:firebase-core:+'
    implementation 'com.android.support:multidex:+'
    debugImplementation 'com.squareup.leakcanary:leakcanary-android:+'
    releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:+'
    // Optional, if you use support library fragments:
    debugImplementation 'com.squareup.leakcanary:leakcanary-support-fragment:+'
}


apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.android.application'

版本或顺序有些混乱。你知道是哪一个吗?

…………………………………………………………………………………………………………………………………………………… .................................................................... …………………………………………………… …………………………………………………………………………………………………………………………………………………… …………………………………………………………………………………………………………

4

1 回答 1

1

尝试将 compileSdkVersion 更改为:compileSdkVersion 28

    compileSdkVersion 28
    buildToolsVersion '28.0.3' //no need for defining buildToolsVersion, comment or delete this line
于 2018-11-12T21:37:45.253 回答