At the beginning of operations everything works fine, but after several "runs", and sometimes after only one "run", the building process fails and the following message appears:
- What went wrong: Execution failed for task ':app:mergeDebugResources'. Could not resolve all files for configuration ':app:_internal_aapt2_binary'. Failed to transform artifact 'aapt2-windows.jar (com.android.tools.build:aapt2:3.6.1-6040484)' to match attributes {artifactType=_internal-android-aapt2-binary, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}. Execution failed for Aapt2Extractor: C:\Users\ASUS.gradle\caches\modules-2\files-2.1\com.android.tools.build\aapt2\3.6.1-6040484\d106313d87db056ba2266a225da944d6d34d0d58\aapt2-3.6.1-6040484-windows.jar. Failed to create directory 'C:\Users\ASUS.gradle\caches\transforms-2\files-2.1\ef393ae4c7145152665380d7d72d709d\aapt2-3.6.1-6040484-windows'
and then this:
File does not exist: C:\Users\MyUserName.gradle\caches\transforms-2\files-2.1\ef393ae4c7145152665380d7d72d709d\aapt2-3.6.1-6040484-windows
Restarting the program did not work, and even the process of deleting the cache and then restarting did not work.
I went to the address mentioned and tried to open it but could not because I had the following error message:
access is denied
The problem was solved only by fully restarting Windows. The program works several times and then the problem will reappear.
This wasted a lot of time. Is there a way to fix the problem without restarting Windows completely?
I have Android Studio 3.6.1
and Gradle 5.6.4
and win 10 64x
I can't delete the folder when Android Studio is running, and when I close it the file deletes itself.
I read a solution which says that you should delete the path, but I can't access the path to paste any thing in it, and I have google() in my gradle.properties.
I updated my Gradle build tool from 3.6.1 to 3.6.2 and still the same error.
my problem is different from this one I have the same problem But in my case I cannot access the missing folder or even delete it or copy something to it In my case, too, the problem does not occur immediately But after several building operations I could not find a solution
Any solution ?