我正面临这个奇怪的问题,即Android Studio不再开放。我现在已经使用Android Studio很长一段时间了,一切都运行得很好但突然之间,由于某种原因它停止了开放。我使用以下配置:
Android Studio 0.5.9
Java版本" 1.6.0_51"
Mac OS 10.6.8
如果有帮助,我可以从" console"中获取堆栈跟踪:
[0x0-0x67067] .com.google.android.studio [2226]:主题中的异常 "主" java.lang.NoClassDefFoundError:java.awt.Toolkit [0x0-0x67067] .com.google.android.studio [2226]:at sun.awt.AppContext $ 2.run(AppContext.java:237) [0x0-0x67067] .com.google.android.studio [2226]:at sun.awt.AppContext $ 2.run(AppContext.java:226) [0x0-0x67067] .com.google.android.studio [2226]:at java.security.AccessController.doPrivileged(本机方法) [0x0-0x67067] .com.google.android.studio [2226]:at sun.awt.AppContext.initMainAppContext(AppContext.java:226) [0x0-0x67067] .com.google.android.studio [2226]:at sun.awt.AppContext.access $ 200(AppContext.java:112) [0x0-0x67067] .com.google.android.studio [2226]:at sun.awt.AppContext $ 3.run(AppContext.java:299) [0x0-0x67067] .com.google.android.studio [2226]:at java.security.AccessController.doPrivileged(本机方法) [0x0-0x67067] .com.google.android.studio [2226]:at sun.awt.AppContext.getAppContext(AppContext.java:280) [0x0-0x67067] .com.google.android.studio [2226]:at sun.awt.AppContext $ 6.getContext(AppContext.java:827) [0x0-0x67067] .com.google.android.studio [2226]:at sun.misc.SharedSecrets.getJavaAWTAccess(SharedSecrets.java:144) [0x0-0x67067] .com.google.android.studio [2226]:at java.util.logging.LogManager.getUserContext(LogManager.java:321) [0x0-0x67067] .com.google.android.studio [2226]:at java.util.logging.LogManager.getLogger(LogManager.java:894) [0x0-0x67067] .com.google.android.studio [2226]:at java.util.logging.LogManager.demandLogger(LogManager.java:369) [0x0-0x67067] .com.google.android.studio [2226]:at java.util.logging.Logger.demandLogger(Logger.java:290) [0x0-0x67067] .com.google.android.studio [2226]:at java.util.logging.Logger.getLogger(Logger.java:321) [0x0-0x67067] .com.google.android.studio [2226]:at java.awt.Component中。(Component.java:173) [0x0-0x67067] .com.google.android.studio [2226]:at com.intellij.idea.Main.showMessage(Main.java:216) [0x0-0x67067] .com.google.android.studio [2226]:at com.intellij.idea.Main.showMessage(Main.java:203) [0x0-0x67067] .com.google.android.studio [2226]:at com.intellij.idea.Main.main(Main.java:86) [0x0-0x67067] .com.google.android.studio [2226]:线程中的异常 "线程1" java.lang.NoClassDefFoundError:java.awt.Toolkit [0x0-0x67067] .com.google.android.studio [2226]:at sun.awt.AppContext $ 2.run(AppContext.java:237) [0x0-0x67067] .com.google.android.studio [2226]:at sun.awt.AppContext $ 2.run(AppContext.java:226) [0x0-0x67067] .com.google.android.studio [2226]:at java.security.AccessController.doPrivileged(本机方法) [0x0-0x67067] .com.google.android.studio [2226]:at sun.awt.AppContext.initMainAppContext(AppContext.java:226) [0x0-0x67067] .com.google.android.studio [2226]:at sun.awt.AppContext.access $ 200(AppContext.java:112) [0x0-0x67067] .com.google.android.studio [2226]:at sun.awt.AppContext $ 3.run(AppContext.java:299) [0x0-0x67067] .com.google.android.studio [2226]:at java.security.AccessController.doPrivileged(本机方法) [0x0-0x67067] .com.google.android.studio [2226]:at sun.awt.AppContext.getAppContext(AppContext.java:280) [0x0-0x67067] .com.google.android.studio [2226]:at sun.awt.AppContext $ 6.getContext(AppContext.java:827) [0x0-0x67067] .com.google.android.studio [2226]:at sun.misc.SharedSecrets.getJavaAWTAccess(SharedSecrets.java:144) [0x0-0x67067] .com.google.android.studio [2226]:at java.util.logging.LogManager.getUserContext(LogManager.java:321) [0x0-0x67067] .com.google.android.studio [2226]:at java.util.logging.LogManager.contexts(LogManager.java:352) [0x0-0x67067] .com.google.android.studio [2226]:at java.util.logging.LogManager.reset(LogManager.java:999) [0x0-0x67067] .com.google.android.studio [2226]:at java.util.logging.LogManager中$ Cleaner.run(LogManager.java:219)
我尝试重新启动机器,重新安装android studio,重新安装java,设置java主路径,但没有任何帮助。如果你们中的任何人都知道解决方案,请告诉我。感谢
答案 0 :(得分:1)
我在同一条船上。那是因为它正在寻找jdk1.7,我发现1.7在Snow Leopard 10.6中不起作用。我尝试安装它,它说我需要Mac OSx 10.7。