Gradle error, failed to create directory

I solved it by changing the JDK version I was using:

  1. Go to File -> Project Structure.
  2. On the left side, click on SDK Location and go to JDK Location.
  3. Change it to the Embedded JDK that comes with Android Studio.
  4. Click on OK.

Finally managed to get rid of all unwanted stuff with AS option:

File -> Invalidate caches / Restart

I've met this error with Android Studio 3.0RC.
How to solve:
open (ctrl+shift+N): gradle.properties
add line: android.enableAapt2=false

You may find something useful here: https://developer.android.com/studio/build/gradle-plugin-3-0-0.html


Found such a dependency, if the project and the environment (SDK, Android Studio) is on different disks (volumes), then there will be an error. This error occurs when the test starts.

Solution, move the project to the root of the disk on which the SDK and Android Studio is located, it's helped me.

Android Studio 3.0.1, compileSdkVersion 27, Windows 10