我有Ubuntu 16 64bit with Mate。
Android工作室从今天起正常工作。
现在,当我在终端中写./studio
时,我有:
java version "1.5.0"
gij (GNU libgcj) version 5.3.1 20160413
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Start Failed: Internal Error. Please report to https://https://code.google.com/p/android/issues
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(libgcj.so.16)
at com.intellij.ide.Bootstrap.main(Bootstrap.java:39)
at com.intellij.idea.Main.main(Main.java:103)
Caused by: java.lang.ExceptionInInitializerError
at java.lang.Class.initializeClass(libgcj.so.16)
at com.intellij.util.containers.LockFreeCopyOnWriteArrayList.<clinit>(LockFreeCopyOnWriteArrayList.java:54)
at java.lang.Class.initializeClass(libgcj.so.16)
at com.intellij.util.containers.ContainerUtil.createConcurrentList(ContainerUtil.java:2550)
at com.intellij.util.containers.ContainerUtil.createLockFreeCopyOnWriteList(ContainerUtil.java:2425)
at com.intellij.openapi.util.registry.RegistryValue.<init>(RegistryValue.java:36)
at com.intellij.openapi.util.registry.Registry.get(Registry.java:48)
at com.intellij.openapi.util.registry.Registry.is(Registry.java:55)
at com.intellij.util.ui.UIUtil.blockATKWrapper(UIUtil.java:108)
at com.intellij.util.ui.UIUtil.<clinit>(UIUtil.java:95)
at java.lang.Class.initializeClass(libgcj.so.16)
at com.intellij.ide.plugins.PluginManager.start(PluginManager.java:71)
at java.lang.reflect.Method.invoke(libgcj.so.16)
...2 more
Caused by: java.lang.RuntimeException: Could not find 'theUnsafe' field in the class sun.misc.Unsafe
at com.intellij.util.concurrency.AtomicFieldUpdater.getUnsafe(AtomicFieldUpdater.java:44)
at com.intellij.util.concurrency.AtomicFieldUpdater.<clinit>(AtomicFieldUpdater.java:38)
at java.lang.Class.initializeClass(libgcj.so.16)
...14 more
Gtk-Message:无法加载模块“topmenu-gtk-module”
Also, an UI exception occurred on attempt to show above message:
java.lang.ExceptionInInitializerError
at java.lang.Class.initializeClass(libgcj.so.16)
at com.intellij.util.containers.LockFreeCopyOnWriteArrayList.<clinit>(LockFreeCopyOnWriteArrayList.java:54)
at java.lang.Class.initializeClass(libgcj.so.16)
at com.intellij.util.containers.ContainerUtil.createConcurrentList(ContainerUtil.java:2550)
at com.intellij.util.containers.ContainerUtil.createLockFreeCopyOnWriteList(ContainerUtil.java:2425)
at com.intellij.openapi.util.registry.RegistryValue.<init>(RegistryValue.java:36)
at com.intellij.openapi.util.registry.Registry.get(Registry.java:48)
at com.intellij.openapi.util.registry.Registry.is(Registry.java:55)
at com.intellij.util.ui.UIUtil.blockATKWrapper(UIUtil.java:108)
at com.intellij.util.ui.UIUtil.<clinit>(UIUtil.java:95)
at java.lang.Class.initializeClass(libgcj.so.16)
at com.intellij.idea.Main.showMessage(Main.java:339)
at com.intellij.idea.Main.showMessage(Main.java:312)
at com.intellij.idea.Main.showMessage(Main.java:291)
at com.intellij.idea.Main.main(Main.java:106)
Caused by: java.lang.RuntimeException: Could not find 'theUnsafe' field in the class sun.misc.Unsafe
at com.intellij.util.concurrency.AtomicFieldUpdater.getUnsafe(AtomicFieldUpdater.java:44)
at com.intellij.util.concurrency.AtomicFieldUpdater.<clinit>(AtomicFieldUpdater.java:38)
at java.lang.Class.initializeClass(libgcj.so.16)
...14 more
为什么会这样?我该如何解决这个错误?
答案 0 :(得分:0)
似乎您偶尔安装了Java 1.5(可能是其他软件的一部分),请检查您拥有的Java SDK并将其更新为1.8(或更新环境参数JAVA_HOME)。我想它将解决问题。