Gradle error upgrading to Android Studio 3.0 Beta 1

后端 未结 7 781

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:



        
相关标签:
7条回答
  • 2020-12-01 10:46

    Its a known issue :As Documented here

    Just do this simply (No need to type commands)

    • Build > Clean Project from the menu bar.

    • Then sync your project files with Gradle by clicking Sync Project from the toolbar.

    0 讨论(0)
  • 2020-12-01 10:49

    If clean and sync doesn't quite work for your Java+Kotlin-mixed project, it's possible that you need to change your Kotlin version to be consistent with the IDE supplied Kotlin version, which as of Android Studio 3.0 Beta 2 is 1.1.3-2. I was using 1.1.4 at the time and I found that I had drop it back down, did my clean and sync before it all works again, at which point I can move back to 1.1.4.

    0 讨论(0)
  • 2020-12-01 10:55

    From https://androidstudio.googleblog.com/2017/08/android-studio-30-beta-1.html, this is a known issue: If you have an existing Android Studio project that's using an alpha version of Android plugin 3.0.0 (such as 3.0.0-alpha9), you may get the following error when you migrate to Android plugin 3.0.0-beta1 and sync your project: Gradle project refresh failed. You could solve it by doing the following steps:

    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.

    See the release note for more details. https://androidstudio.googleblog.com/2017/08/android-studio-30-beta-1.html

    Happy coding!

    0 讨论(0)
  • 2020-12-01 11:02

    Credit to @Grsmto

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

    UPDATE

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

    Windows

    gradlew clean

    gradlew assemble

    Linux/Mac

    ./gradlew clean

    ./gradlew assemble

    then sync the project.

    0 讨论(0)
  • 2020-12-01 11:04

    Known issue: If you have an existing Android Studio project that's using an alpha version of Android plugin 3.0.0 (such as 3.0.0-alpha9), you may get the following error when you migrate to Android plugin 3.0.0-beta1 and sync your project: Gradle project refresh failed.

    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.

    See the release note for more details. https://androidstudio.googleblog.com/2017/08/android-studio-30-beta-1.html

    0 讨论(0)
  • 2020-12-01 11:05
    Gradle sync failed: Cause: java.lang.NullPointerException
                at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:98)
                at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
                at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
                at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
                at java.nio.file.Paths.get(Paths.java:84)
    

    Read official Release Guideline

    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.

    NOTE

    3.0 Beta 1 or 3.0 Beta 2

    An early version of a program or application that contains most of the major features, but is not yet complete. Sometimes these versions are released only to a select group of people, or to the general public, for testing and feedback .

    0 讨论(0)
提交回复
热议问题