Reputation: 307
I am getting "Gradle project sync failed." when I start up Android Studio. When I try to clean the project, I get "Failed to complete Gradle execution Cause: URI has an authority component"
I've tried several things already and am still stuck. I moved my config files out of my user folders and put them in my root directory where I have Android Studio. (C:/Studio). I've also tried to invalidate caches but that still didn't help. I'm on a networked VDI so I'm not sure if that might have something to do with it. Below is the message I'm getting from Gradle sync. Any ideas what can be going wrong here?
Gradle Sync Message:
Error:Unable to start the daemon process. This problem might be caused by incorrect configuration of the daemon. For example, an unrecognized jvm option is used. Please refer to the user guide chapter on the daemon at http://gradle.org/docs/1.12/userguide/gradle_daemon.html
java.lang.IllegalArgumentException: URI has an authority component at java.io.File.(File.java:423) at org.gradle.api.internal.classpath.EffectiveClassPath.findAvailableClasspathFiles(EffectiveClassPath.java:41) at org.gradle.api.internal.classpath.EffectiveClassPath.(EffectiveClassPath.java:32) at org.gradle.api.internal.classpath.DefaultModuleRegistry.(DefaultModuleRegistry.java:61) at org.gradle.api.internal.classpath.DefaultModuleRegistry.(DefaultModuleRegistry.java:55) at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:41) at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32) at org.gradle.launcher.daemon.bootstrap.GradleDaemon.main(GradleDaemon.java:22)
Upvotes: 2
Views: 1660
Reputation: 80020
The only cause I've seen of this is if your home directory is on a network share (it has a Windows path of the form (\\UNC_PATH\... instead of something like C:\ for a local file). Gradle doesn't properly support that right now. There's a bug in Android Studio's bug database to track it:
https://code.google.com/p/android/issues/detail?id=56444
and it references a bug in Gradleware's bug database:
https://issues.gradle.org/browse/GRADLE-2941
The Android Studio bug report lists this as a workaround:
I also faced same issue. Reason I figured out that may be when I installed Android Studio with option -- Install to current User. This step installed .gradle folder in the organization Network Path [\{network}\users{USERID}.gradle]
Resolution step: [On Windows 7 Machine]
Copied .gradle folder from path on network [\{network}\users{USERID}.gradle] to [C:\Users{USERID}.gradle]
In Android Studio v-(Beta) 0.8.6 [File --> Settings] changed Gradle Settings
Global Gradle settings
Service directory path: C:/Users/{USERID}/.gradle
Gradle VM options: -Dhttp.proxyHost={dummyHost} -Dhttp.proxyPort={dummyPort} -Dhttp.proxyUser={dummyUser} -Dhttp.proxyPassword={dummyPassword}
I had also given Gradle VM options because it tried to download Gradle-0.12+-all.jar before compiling.
Upvotes: 5
Reputation: 775
if you don't have a strong internet connectivity make sure you select the offline mode from the console. Selecting offline mode could solve the issue.
Upvotes: 0