1

Android studio is showing errors on every line that is related to support library. And on rebuilding the project it says:

Android resource linking failed.

I've tried following:

  1. clean/rebuild

  2. Invaidate caches/Restart

  3. Uninstall/Reinstall Android Studio

My build.gradle(app) is Following:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.androphobia.fyp.spreadknowledge"
        minSdkVersion 15
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    buildToolsVersion '28.0.3'
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.google.firebase:firebase-auth:16.1.0'
    implementation 'com.google.firebase:firebase-core:16.0.7'
    implementation 'com.google.firebase:firebase-storage:16.1.0'
    implementation 'com.google.firebase:firebase-firestore:18.0.1'
    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'
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'de.hdodenhof:circleimageview:3.0.0'
    implementation 'com.google.android.gms:play-services-location:16.0.0'
    implementation 'com.github.bumptech.glide:glide:4.9.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:support-media-compat:28.0.0'
    implementation 'com.android.support:support-v4:28.0.0'
    implementation 'com.android.support:support-compat:28.0.0'
}

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

styles.xml is as Following:

<resources>

    <!-- Base application theme. -->

    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
    </style>

    <style name="AppTheme.NoActionBar">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
        <item name="colorAccent">@color/white</item>
    </style>

    <style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />

    <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />

</resources>

Image of styles.xml in project is as: styles.xml

Image of results on rebuilding project: Image of results on rebuilding project

Hamza Khursheed
  • 2,399
  • 2
  • 15
  • 17

7 Answers7

0

Please try adding this dependency here :

 implementation "com.android.support:support-core-utils:28.0.0"
coroutineDispatcher
  • 7,718
  • 6
  • 30
  • 58
0

remove this two dependency,

implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:support-compat:28.0.0'
Mayur Dabhi
  • 3,607
  • 2
  • 14
  • 25
0

downgrade to 27 and check,or check sdk 28 is installed

Sejpal Pavan
  • 130
  • 10
0

Migrating to Android-X resolved the issue.

Go to:

Refactor --> Migrate to AndroidX

Hamza Khursheed
  • 2,399
  • 2
  • 15
  • 17
0
1. Close the Android Studio 
2. Delete the .AndroidStudio3.3 folder from File System
3. start Android Studio after that .AndroidStudio3.3 Folder Recreated Automaticall then 
   Your Error will be solved
Hardik Bhalala
  • 209
  • 2
  • 6
0

Issue related CircleImageView version and your project.

In Your project your support library version 28.0.0 (pre-androidx) and CircleImageView version 3 which is running androidx version.

so you have to upgrade your project androidx or downgrade circleImageView version to 2.x

Basi
  • 3,009
  • 23
  • 28
0

File > Invalidate caches/Restart

Worked for me.

Kamran Riyaz
  • 79
  • 2
  • 3