Uli Loose
Uli Loose

Reputation: 19

Android resource linking failed, order mixed up

I am trying to build an app that worked before.

This is the error message:

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

These are the build gradles

// 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
}

and

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'

Something with the versions or order is mixed up. Do you know which one?

................ ................ ................ ................ ................ ................ ................ ................ ................ ................ ................ ................ ................ ................ ................

Upvotes: 0

Views: 281

Answers (1)

navylover
navylover

Reputation: 13579

try to change the compileSdkVersion to: compileSdkVersion 28

    compileSdkVersion 28
    buildToolsVersion '28.0.3' //no need for defining buildToolsVersion, comment or delete this line

Upvotes: 1

Related Questions