我一直能够使用Android 。我升级到了Gradle版本2.9,并在构建过程中不断地出现错误。我得到以下错误:
Gradle:
FAILURE: Build failed with an exception.
* What went wrong:
Could not create service of type ScriptPluginFactory using
BuildScopeServices.createScriptObjectConfigurerFactory().
* Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.我试过用--stacktrace和--运行它,但是它似乎没有多大帮助。我应该把它贴在这里寻求帮助吗?
编辑(我的--调试输出):
19:39:58.668 [DEBUG]
[org.gradle.internal.nativeintegration.services.NativeServices]
Unable to initialize native-platform.
Failure net.rubygrapefruit.platform.NativeException: Failed to load
native library 'libnative-platform.dylib' for Mac OS X x86_64.
caused by: java.io.FileNotFoundException:
/Users/Johnwon/.gradle/native/19/osx-amd64/libnative- platform.dylib.lock (Permission denied)
19:39:58.718 [DEBUG] [org.gradle.internal.nativeintegration.filesystem.services.FileSystemServices] Native-platform file system integration is not available. Continuing with fallback.
19:39:58.721 [DEBUG] [org.gradle.internal.nativeintegration.filesystem.services.FileSystemServices] Using UnsupportedSymlink implementation.
19:39:58.723 [DEBUG] [org.gradle.internal.nativeintegration.filesystem.services.FileSystemServices] Using JDK 7 file service org.gradle.internal.nativeintegration.filesystem.jdk7.PosixJdk7FilePermissionHandler
19:39:59.522 [DEBUG] [org.gradle.internal.resource.transport.http.JavaSystemPropertiesProxySettings] Found java system property 'http.nonProxyHosts': local|*.local|169.254/16|*.169.254/16. Will ignore proxy settings for these hosts.发布于 2015-12-12 10:34:24
如果什么都不起作用,那就做
只需删除您的.gradle文件夹 位于这里的C:\Users\username.gradle (for Windows)
发布于 2016-06-07 12:12:57
在我的例子中,这是由安装在64位计算机上的32位JVM造成的(我正在使用(jdk-8u92-linux-i586.tar.gz). )。
切换到(jdk-8u92-linux-x64.tar.gz)安装x64 JDK解决了这个问题。
发布于 2018-03-13 22:25:01
在我的例子中,这是由于文件系统中的权限不足造成的。我只需更改目录所有者,它就会开始工作:
sudo chown -fR $(whoami):staff /opt/gradle-4.6https://stackoverflow.com/questions/34238782
复制相似问题