Reputation: 1444
My Android Studio project worked correctly, after restart project i got this error :
Caused by: org.gradle.api.UncheckedIOException: Failed to create directory 'C:\Users\Win\ .gradle\caches\transforms-2\files-2.1\32579628dbe4361d42479786c21faaed'
I did these things and the problem is not resolved:
Invalidate caches / restart
Clean / Rebuild
Extra info:
Android studio version: 3.4.1
compileSdkVersion: 29
minSdkVersion 21
targetSdkVersion 29
Anyone can resolve this problem ?
Upvotes: 3
Views: 1927
Reputation: 1035
In my case, nothing of the above suggested fixes worked. Eventually, it was a folder permissions setting on Windows' side.
Upvotes: 0
Reputation: 606
I've tried the solution removing the .gradle/caches folder, but it not worked.
I've tried the solution Invalidates caches / restart -> rebuild, but it not worked too.
I solved this updating my gradle version to gradle-6.3 at gradle-wrapper.properties:
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
This gradle version requires Android gradle plugin at least 3.6.0:
buildscript {
dependencies {
classpath "com.android.tools.build:gradle:$gradle_version"
}
}
Upvotes: 0
Reputation: 12583
Go to path C:\Users\Win\ .gradle\caches
and manually delete this directory. Note that .gradle
is a hidden folder.
Upvotes: 1