I got this error after update my Gradle (I have also added maven{jitpack.io} and geofirestore dependencies at the same of updating Gradle) :
Android resource linking failed Output: C:\Users\Paul\AndroidStudioProjects\How2Ride2\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found. C:\Users\Paul\AndroidStudioProjects\How2Ride2\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found. C:\Users\Paul\AndroidStudioProjects\How2Ride2\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:1169: error: resource android:attr/fontVariationSettings not found. C:\Users\Paul\AndroidStudioProjects\How2Ride2\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:1170: error: resource android:attr/ttcIndex not found. error: failed linking references. Command: C:\Users\Paul\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.0-4818971-windows.jar\74062dcec80f00402d5904d26f22db6e\aapt2-3.2.0-4818971-windows\aapt2.exe link -I\ C:\Users\Paul\AppData\Local\Android\Sdk\platforms\android-27\android.jar\ --manifest\ C:\Users\Paul\AndroidStudioProjects\How2Ride2\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\ -o\ C:\Users\Paul\AndroidStudioProjects\How2Ride2\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\ -R\ @C:\Users\Paul\AndroidStudioProjects\How2Ride2\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\ --auto-add-overlay\ --java\ C:\Users\Paul\AndroidStudioProjects\How2Ride2\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\ --custom-package\ com.how2ride.how2ride\ -0\ apk\ -c\ en,fr\ --output-text-symbols\ C:\Users\Paul\AndroidStudioProjects\How2Ride2\app\build\intermediates\symbols\debug\R.txt\ --no-version-vectors Daemon: AAPT2 aapt2-3.2.0-4818971-windows Daemon #0
How can I solve this?
Here my Project build gradle:
buildscript { repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.2.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files classpath 'com.google.gms:google-services:4.0.2' } } allprojects { repositories { google() jcenter() maven { url 'https://jitpack.io' } } } task clean(type: Delete) { delete rootProject.buildDir }
and my Module build gradle:
apply plugin: 'com.android.application' android { compileSdkVersion 27 defaultConfig { applicationId "com.how2ride.how2ride" minSdkVersion 21 targetSdkVersion 27 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" resConfigs "en", "fr" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) //noinspection GradleCompatible implementation 'com.android.support:appcompat-v7:27.1.1' implementation 'com.android.support:support-v4:27.1.1' implementation 'com.android.support:design:27.1.1' implementation 'com.google.android.gms:play-services-maps:15.0.1' implementation "com.google.android.gms:play-services-location:15.0.1" implementation 'com.google.firebase:firebase-ads:15.0.1' implementation 'com.google.firebase:firebase-core:16.0.3' implementation 'com.firebaseui:firebase-ui-auth:4.1.0' implementation 'com.google.firebase:firebase-auth:16.0.3' implementation 'com.google.firebase:firebase-firestore:17.1.0' implementation 'com.github.imperiumlabs:GeoFirestore-Android:v1.1.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' } apply plugin: 'com.google.gms.google-services'
I have the last version of android studio and my project worked perfectly before upgrading my gradle...
The Android resource linking failed error can also occur if you have an error in any of your XML resources.
AAPT: Error: failed writing to '… \app\build\intermediates\runtim_symbol_list\debug\R. txt': … Error log. The cause of this issue is all about the combination of Android Gradle Plugin Version and Gradle Version.
Change the compileSdkVersion to:
compileSdkVersion 28
These attributes were added in this version. Check here, here and here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With