在Mint 16上安装Android Studio时出现问题

时间:2015-05-27 00:09:45

标签: java android android-studio

我正在尝试安装Android Studio,我已经从网站下载了zip文件,将其解压缩并尝试运行./studio.sh但是这不起作用,我收到以下消息:

Java HotSpot(TM) Server VM warning: ignoring option MaxPermSize=250m; support was removed in 8.0

Start Failed: Internal error. Please report to https://code.google.com/p/android/issues

java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at com.intellij.ide.Bootstrap.main(Bootstrap.java:39)
    at com.intellij.idea.Main.main(Main.java:83)
Caused by: java.lang.UnsatisfiedLinkError: /opt/java/jre/lib/i386/libawt_xawt.so: libXrender.so.1: cannot open shared object file: No such file or directory
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1822)
    at java.lang.Runtime.load0(Runtime.java:809)
    at java.lang.System.load(System.java:1086)
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1843)
    at java.lang.Runtime.loadLibrary0(Runtime.java:870)
    at java.lang.System.loadLibrary(System.java:1122)
    at java.awt.Toolkit$3.run(Toolkit.java:1636)
    at java.awt.Toolkit$3.run(Toolkit.java:1634)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Toolkit.loadLibraries(Toolkit.java:1633)
    at java.awt.Toolkit.<clinit>(Toolkit.java:1668)
    at java.awt.Cursor.<clinit>(Cursor.java:195)
    at javax.swing.text.html.HTMLEditorKit.<clinit>(HTMLEditorKit.java:623)
    at com.intellij.util.ui.UIUtil.<clinit>(UIUtil.java:96)
    at com.intellij.ide.plugins.PluginManager.start(PluginManager.java:71)
    ... 6 more


Also, an UI exception occurred on attempt to show above message:
java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit
    at java.awt.Component.<clinit>(Component.java:593)
    at com.intellij.idea.Main.showMessage(Main.java:231)
    at com.intellij.idea.Main.showMessage(Main.java:217)
    at com.intellij.idea.Main.main(Main.java:86)

当我java -version时,我得到:

java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) Server VM (build 25.45-b02, mixed mode)

当我javac -version时,我得到:

javac 1.7.0_55

感谢任何帮助,谷歌搜索了几个小时:(

2 个答案:

答案 0 :(得分:1)

安装64位Java。您当前正在运行32位版本。这就是错误

java.lang.UnsatisfiedLinkError: 
               /opt/java/jre/lib/i386/libawt_xawt.so: libXrender.so.1:

告诉你。 i386是32位Java。

答案 1 :(得分:0)

在我的情况下,这是因为在全新安装openjdk-7-jdk后缺乏重启debian linux。重启后Android Studio安装没有错误。