Gradle sync failed: Failed to create parent directory
I've faced a problem during the installation process of the android studio. I've ignored the failure at the start and after creating a project,it stated that "Gradle sync failed: Failed to create parent directory".
I've downloaded most SDK and searched for possible answers online but I'm still not able to solve the problems.
Please provide me with all the help possible. Thank you
Solution 1:
In my case, I have pulled my repository, and it was displaying this error. To fix, just run the commands:
flutter clean
and then:
flutter run
Solution 2:
It is because android studio needs admin privilege to create directory in that path. So, to solve this problem simply run android studio as administrator
Solution 3:
Look at the location its failing to create, go to that location and delete cache folder, worked for me
Solution 4:
deleting the build folder in the android/app directory fix my problem