简体   繁体   中英

Gradle project sync failed in android studio in linux

I use android studio in linux os. 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?

I had this problem in Ubuntu 14.04 where /tmp was mounted with noexec parameter. To fix this I needed to remount with exec allowed:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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