Reputation: 21
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{}],"original":"ERROR:: AAPT: D:\android-basics-kotlin-cupcake-app-starter\app\build\intermediates\processed_res\debug\out\resources-debug.ap_: error: The system cannot find the file specified. (2).\nerror: failed to create archive.\n\n ","tool":"AAPT"}
Task :app:mergeDebugNativeLibs Task :app:mergeExtDexDebug
FAILURE: Build failed with an exception.
A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction Android resource linking failed ERROR:: AAPT: D:\android-basics-kotlin-cupcake-app-starter\app\build\intermediates\processed_res\debug\out\resources-debug.ap_: error: The system cannot find the file specified. (2). error: failed to create archive.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.7.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 7s 27 actionable tasks: 26 executed, 1 up-to-date
Can anyone help me to solve this problem...? please...
Upvotes: 1
Views: 361
Reputation: 41
This is what happens when aapt
fails to create an archive.
First make sure you are using the latest IDE and SDK. aapt
for packaging is obsolete, and the earlier aapt2
has many bugs.
If they are up to date, try to check if the following processes on your computer have read/write access to the project directory.
If you haven't set permissions manually, they are usually blocked by security software.
I recently ran into this problem and spent a lot of time finally found out that the security software on my workstation was not adding aapt2
and aapt
to the allowed list for the project repository.
Upvotes: 0