I recently upgraded from Android Studio from 3.0 alpha to 3.0 beta and this error started occurring on Gradle sync. How do I fix this?
Gradle sync failed: Cause: java.lang.NullPointerException
at sun.nio.fs.UnixPath.normalizeAndCheck(UnixPath.java:77)
at sun.nio.fs.UnixPath.<init>(UnixPath.java:71)
at sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:281)
The Android Studio 3.0 beta produces errors on upgrading from Android Studio 3.0 canary alpha as Google warned developers during the release notes. However, it's easy to miss reading these release notes and click upgrade.
Be sure to follow these steps for each project as recommended by the Android Studio team:
"Resolve this issue selecting Build > Clean Project from the menu bar—you need to perform this action only once for each project. You can then sync your project files with Gradle by clicking Sync Project from the toolbar."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With