AAPT: error: failed writing to R.txt Android resources linking failed ':app:processDebugResources' Android Studio 4.0.1 (Aug 2020)
Previously, we talked about this version of Android Studio has an issue of Launcher Activity (See here). Now we got another issue about Android Studio 4.0.1, which is Gradle Build Process failed at ':app:processDebugResources'
This issue will produce log like:
AGPBI: {“kind”:”error”,”text”:”Android resources linking failed” …..
AAPT: Error: failed writing to ‘…\app\build\intermediates\runtim_symbol_list\debug\R.txt’: …
The cause of this issue is all about the combination of Android Gradle Plugin Version and Gradle Version.
The problematic combination I experience is
Android Gradle Plugin Version:4.0.1
Gradle Version: 6.1.1
To workaround this problem, we have to lower Android Gradle Tool version and Gradle Version.
I tested below combination that works.
Combination:
Android Gradle Plugin Version: 3.6.1
Gradle Version: 6.0
To change this setting:
- Select File>Project Structure.
- Type in (3.6.3) the Android Gradle Plugin Version.
- Type/select (6.0) from dropdown menu the Gradle Version.
- Hit
OK
toSave
.
That’s it.
Happy coding.
Let me know if you find better solution or approach in the comment section below. ;)
Find me at Twitter @rick3817
Reference:
#android #androiddev #androidstudio #gradle #androidgradle #buildtool