Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the fix for this normalizeAndCheck(UnixPath.java) NullPointerException on Gradle sync? [duplicate]

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)
like image 973
colintheshots Avatar asked Jan 30 '23 18:01

colintheshots


1 Answers

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."

like image 163
colintheshots Avatar answered Feb 03 '23 07:02

colintheshots