Gradle Could not create service of type InitScriptHandler using BuildScopeServices.createInitScriptHandler()

后端 未结 22 1882
囚心锁ツ
囚心锁ツ 2020-12-05 03:39

I used gradle build command in Centos 7 terminal and I got output:

FAILURE: Build failed with an exception.

* What we         


        
相关标签:
22条回答
  • 2020-12-05 04:31

    The Problem solved by simply using "sudo" and giving access to gradle to create a folder and write cache. use:

    sudo ./gradlew
    
    0 讨论(0)
  • 2020-12-05 04:31

    For future reference. I had the same problem, the issue was that the antivirus was blocking OpenJdk platform binary and java.exe which prevented android studio from being able to modify the files

    0 讨论(0)
  • 2020-12-05 04:36

    I ran into this exception when trying to build a project that was mounted as read-only filesystem in a VM. The project set its own gradle cache so changing GRADLE_USER_HOME did not work. I had to change the filesystem to be read/write.

    0 讨论(0)
  • 2020-12-05 04:38

    This is a permission issue. do a gradle wrapper --stacktrace you should see something like this Failed to create parent directory '/home/cloud_user/my-project/gradle' when creating directory '/home/cloud_user/my-project/gradle/wrapper'

    the user, cloud_user, has no permission to the directory make cloud_user owner of the folder sudo chown -R cloud_user:cloud_user /home/cloud_user/my-project/

    0 讨论(0)
  • 2020-12-05 04:38

    I used a Gradle project in Eclipse, Eclipse's Gradle was giving that error. When I installed NetBeans and its Gradle Plugin, the problem has gone, project was building okay. Another way to circumvent this error was using commandline ./gradlew , project also built successfully.

    It seems that Eclipse's era is over, they appear to be unable to follow the progress.

    0 讨论(0)
  • 2020-12-05 04:40

    Permission issue. This fixed the issue for me:

    sudo chown -R $USER dir

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