在Android Studio中创建或打开项目并与Gradle文件同步项目时,出现以下错误:
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
https://docs.gradle.org/4.4/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error: Could not find or load main class org.gradle.launcher.daemon.bootstrap.GradleDaemon
我在互联网上搜索了此问题,但没有发现有用的信息。
启动Android Studio时,也会收到以下“致命错误” :
Could not initialize class com.sun.jna.Native
java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
at com.sun.jna.platform.win32.WinDef$ULONGLONG.<clinit>(WinDef.java:879)
at com.intellij.ui.Win7TaskBar.<clinit>(Win7TaskBar.java:53)
at com.intellij.ui.AppIcon$Win7AppIcon._hideProgress(AppIcon.java:417)
at com.intellij.ui.AppIcon$BaseIcon.hideProgress(AppIcon.java:105)
at com.intellij.openapi.project.DumbServiceImpl$AppIconProgress.lambda$finish$1(DumbServiceImpl.java:657)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:822)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:763)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:423)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
我不知道为什么会这样,而且我无法继续开发任何项目。我该如何解决这个问题?