简体   繁体   English

Gradle项目同步在Linux中的Android Studio中失败

[英]Gradle project sync failed in android studio in linux

I use android studio in linux os. 我在linux操作系统中使用android studio。 When I create a project or open a new project, I found the following error: 创建项目或打开新项目时,发现以下错误:

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/2.2.1/userguide/gradle_daemon.html
Please read the following process output to find out more:

Java HotSpot(TM) Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
22:25:20.715 [main] DEBUG o.g.l.daemon.bootstrap.DaemonMain - Assuming the daemon was started with following jvm opts: [-XX:MaxPermSize=256m, -XX:+HeapDumpOnOutOfMemoryError, -Xmx512M, -Dfile.encoding=UTF-8, -Duser.country=US, -Duser.language=en, -Duser.variant]

FAILURE: Build failed with an exception.

What went wrong:
Could not create service of type DaemonContext using DaemonServices.createDaemonContext().

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

how to resolve this problem in linux os on my android studio? 如何在我的Android Studio上的Linux OS中解决此问题?

I had this problem in Ubuntu 14.04 where /tmp was mounted with noexec parameter. 我在Ubuntu 14.04中用noexec参数挂载/ tmp时遇到了这个问题。 To fix this I needed to remount with exec allowed: 为了解决这个问题,我需要使用exec重新安装:

mount -o remount,exec /tmp

The issue is referenced here: 这里引用了该问题:

https://discuss.gradle.org/t/gradle-v1-12-daemon-fails-to-start-if-tmp-is-mounted-with-noexec/2077 https://discuss.gradle.org/t/gradle-v1-12-daemon-fails-to-start-if-tmp-is-mounted-with-noexec/2077

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM