Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio failed linking references [closed]

I am getting the following error in my Android Studio. This is after the recent update I did. My Android Studio version is 3.4, Gradle version is 5.5.1, plugin version is 3.4.2

Here is the error:

Android resource linking failed

warn: removing resource com.anirudh.gighub:string/com_facebook_loginview_logged_in_using_facebook_f1gender without required default value.
  F:\gigHub\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:1437: error: resource dimen/smallTxtSize (aka com.anirudh.gighub:dimen/smallTxtSize) not found.
  F:\gigHub\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:1438: error: resource drawable/facebook_signin_btn (aka com.anirudh.gighub:drawable/facebook_signin_btn) not found.
  error: failed linking references.****

Here is the `build.gradle

//noinspection GradleCompatible
apply plugin: 'com.android.application'
android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.anirudh.gighub"
        minSdkVersion 16
        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(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    testImplementation 'junit:junit:4.13-beta-3'
    implementation 'com.google.firebase:firebase-auth:18.1.0'
    implementation 'com.facebook.android:facebook-login:5.0.1'
    implementation 'com.github.ybq:Android-SpinKit:1.2.0'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation ` enter code here `
    'com.android.support.test.espresso:espresso-core:3.0.2'
}
like image 754
Anirudh Vashisht Avatar asked Jul 22 '19 03:07

Anirudh Vashisht


2 Answers

Try this

1) File -> Invalidate Caches / Restart

2) Delete the build file under app (F:\gigHub\app\build)

3) Clean Project

4) Rebuild Project

like image 101
Farouq Afghani Avatar answered Oct 10 '22 21:10

Farouq Afghani


1) Check Your "dimen.xml" file and add that line (if file not found create that)

<dimen name="smallTxtSize">14sp</dimen>

2) Check your "drawable" folder "facebook_signin_btn" file was found or not? (if file not found create that)

like image 22
Bhautik Keraliya Avatar answered Oct 10 '22 22:10

Bhautik Keraliya