Home / Android / Android Resource Linking Failed

Android Resource Linking Failed

Android Resource Linking Failed is the weird problem in Android Studio. I searched for a long time to resolve the issue. Here is all my code. I think there is some problem in android studio. I have tried all things but found no solution. Following things I tried..




  • Invalidate Cache/Restart….
  • Build
  • Rebuild
  • Restart
  • Update
  • Changed SDK Path
  • Clean Project
  • Tried different repositories implementation ‘com.android.support:appcompat-v7:28.0.0+’

MainActivity.java

 

package com.enterapps9.test4;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
}




activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello World!"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

</android.support.constraint.ConstraintLayout>


build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.enterapps9.test4"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

Android resource linking failed C:\Users\Shah\AndroidStudioProjects\Test4\app\build\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml:402: error: resource anim/abc_popup_enter (aka com.enterapps9.test4:anim/abc_popup_enter) not found. C:\Users\Shah\AndroidStudioProjects\Test4\app\build\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml:403: error: resource anim/abc_popup_exit (aka com.enterapps9.test4:anim/abc_popup_exit) not found. C:\Users\Shah\AndroidStudioProjects\Test4\app\build\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml:406: error: resource anim/abc_grow_fade_in_from_bottom (aka com.enterapps9.test4:anim/abc_grow_fade_in_from_bottom) not found. C:\Users\Shah\AndroidStudioProjects\Test4\app\build\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml:407: error: resource anim/abc_shrink_fade_out_from_bottom (aka com.enterapps9.test4:anim/abc_shrink_fade_out_from_bottom) not found. C:\Users\Shah\AndroidStudioProjects\Test4\app\build\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml:410: error: resource anim/abc_tooltip_enter (aka com.enterapps9.test4:anim/abc_tooltip_enter) not found. C:\Users\Shah\AndroidStudioProjects\Test4\app\build\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml:411: error: resource anim/abc_tooltip_exit (aka com.enterapps9.test4:anim/abc_tooltip_exit) not found. C:\Users\Shah\AndroidStudioProjects\Test4\app\build\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml:567: error: resource color/abc_btn_colored_borderless_text_material (aka com.enterapps9.test4:color/abc_btn_colored_borderless_text_material) not found. C:\Users\Shah\AndroidStudioProjects\Test4\app\build\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml:570: error: resource color/abc_btn_colored_text_material (aka com.enterapps9.test4:color/abc_btn_colored_text_material) not found. C:\Users\Shah\AndroidStudioProjects\Test4\app\build\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml:624: error: resource drawable/abc_list_selector_holo_dark (aka com.enterapps9.test4:drawable/abc_list_selector_holo_dark) not found. C:\Users\Shah\AndroidStudioProjects\Test4\app\build\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml:655: error: resource color/abc_background_cache_hint_selector_material_dark (aka com.enterapps9.test4:color/abc_background_cache_hint_selector_material_dark) not found. C:\Users\Shah\AndroidStudioProjects\Test4\app\build\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml:658: error: resource color/abc_primary_text_material_dark (aka com.enterapps9.test4:color/abc_primary_text_material_dark) not found. C:\Users\Shah\AndroidStudioProjects\Test4\app\build\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml:659: error: resource color/abc_primary_text_material_light (aka com.enterapps9.test4:color/abc_primary_text_material_light) not found. C:\Users\Shah\AndroidStudioProjects\Test4\app\build\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml:660: error: resource color/abc_primary_text_disable_only_material_dark (aka com.enterapps9.test4:color/abc_primary_text_disable_only_material_dark) not found. C:\Users\Shah\AndroidStudioProjects\Test4\app\build\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml:661: error: resource color/abc_secondary_text_material_dark (aka com.enterapps9.test4:color/abc_secondary_text_material_dark) not found. C:\Users\Shah\AndroidStudioProjects\Test4\app\build\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml:662: error: resource color/abc_secondary_text_material_light (aka com.enterapps9.test4:color/abc_secondary_text_material_light) not found. C:\Users\Shah\AndroidStudioProjects\Test4\app\build\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml:663: error: resource color/abc_secondary_text_material_dark (aka com.enterapps9.test4:color/abc_secondary_text_material_dark) not found. C:\Users\Shah\AndroidStudioProjects\Test4\app\build\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml:664: error: resource color/abc_secondary_text_material_light (aka com.enterapps9.test4:color/abc_secondary_text_material_light) not found. C:\Users\Shah\AndroidStudioProjects\Test4\app\build\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml:665: error: resource color/abc_hint_foreground_material_dark (aka com.enterapps9.test4:color/abc_hint_foreground_material_dark) not found. C:\Users\Shah\AndroidStudioProjects\Test4\app\build\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml:666: error: resource color/abc_hint_foreground_material_light (aka com.enterapps9.test4:color/abc_hint_foreground_material_light) not found. C:\Users\Shah\AndroidStudioProjects\Test4\app\build\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml:672: error: resource color/switch_thumb_material_dark (aka com.enterapps9.test4:color/switch_thumb_material_dark) not found.

 

 

Solution 




If you have tried all above methods then try the following steps. You will surely get your solution.

1. change following library  from

implementation 'com.android.support:appcompat-v7:28.0.0'

to
implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'

 

OR

 

2. Remove following lines from activity-main.xml file

xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"

The thing to remember is there is always error in Android Build Tools, Compiled SDK Version, Build SDK Version, Android Version or in the library implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'

That's it.... #AndroidResourceLinkingFailed




About admin

Expert in SEO, Web Development, Content Writing and Digital Media Marketing.

Leave a Reply

Your email address will not be published. Required fields are marked *