Getting issue when trying to build apk.
Android studio version - 4.0 (recently updated AS)
This process shows the error in build - :app:processDebugResources Android resource linking failed AAPT: unknown option '--no-proguard-location-reference'.
aapt2 link [options] -o arg --manifest arg files...
Options: -o arg Output path. --manifest arg Path to the Android manifest to build. -I arg Adds an Android APK to link against. -A arg An assets directory to include in the APK
Trying to build apk by with Build APK option from Build Menu in android studio
Gradle project file
classpath 'com.android.tools.build:gradle:4.0.0'
classpath 'com.google.gms:google-services:4.3.3'
classpath 'io.fabric.tools:gradle:1.31.2'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72"
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.
if you have : "_internal_aapt2_binary" in gradle file (for earlier versions of gradle) then just remove that.
configurations.matching { it.name == '_internal_aapt2_binary' }.all { config ->
config.resolutionStrategy.eachDependency { details ->
details.useVersion("3.5.0-alpha03-5252756")
}
}
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