der_Fidelis der_Fidelis -3 years ago 230
Android Question

Gradle error upgrading to Android Studio 3.0 Beta 1

Note: This seems to be an issue with the Android plugin. See comments for associated issues.

I get the following gradle error when building the project:

Gradle sync failed: Cause: java.lang.NullPointerException
at sun.nio.fs.WindowsPathParser.parse(
at sun.nio.fs.WindowsPathParser.parse(
at sun.nio.fs.WindowsPath.parse(
at sun.nio.fs.WindowsFileSystem.getPath(
at java.nio.file.Paths.get(
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(

I will note additionally that I had to set the jdk location manually because if I used the bundled one the gradle daemon would not start, complaining of not being in the expected context (it was expecting the bundled context, instead getting the external context).

This configuration worked (with the bundled jdk) in canary 9.

Answer Source

Credit to @Grsmto

As per this blog post you need to open a terminal and launch the following commands sequentially:


Now the workaround it's easier, you just need to go to Build -> Clean Project and then sync.


gradlew clean

gradlew assemble


./gradlew clean

./gradlew assemble

then sync the project.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download