2 sinat 21595363 sinat_21595363 于 2015.07.20 23:06 提问

Linux下安装Android Studio出错,求大神解答!

JDK都配置好了,运行

 zoegreen@zoegreen-Lenovo-IdeaPad-Y470:/opt/android-studio/bin$ java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) Server VM (build 24.51-b03, mixed mode)

但在最后一步执行./studio.sh时不能打开studio,出现以下错误:

 zoegreen@zoegreen-Lenovo-IdeaPad-Y470:/opt/android-studio/bin$ ./studio.sh

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:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.intellij.ide.Bootstrap.main(Bootstrap.java:39)
    at com.intellij.idea.Main.main(Main.java:83)
Caused by: java.lang.UnsatisfiedLinkError: /usr/lib/jvm/jdk1.7.0_51/jre/lib/i386/xawt/libmawt.so: libXtst.so.6: 无法打开共享对象文件: 没有那个文件或目录
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1851)
    at java.lang.Runtime.load0(Runtime.java:795)
    at java.lang.System.load(System.java:1062)
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1872)
    at java.lang.Runtime.loadLibrary0(Runtime.java:849)
    at java.lang.System.loadLibrary(System.java:1088)
    at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:67)
    at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:47)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Toolkit.loadLibraries(Toolkit.java:1646)
    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:624)
    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:595)
    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)

4个回答

caozhy
caozhy   Ds   Rxr 2015.07.20 23:10

/usr/lib/jvm/jdk1.7.0_51/jre/lib/i386/xawt/libmawt.so: libXtst.so.6: 无法打开共享对象文件: 没有那个文件或目录
看下是不是少文件

sinat_21595363
sinat_21595363 我把libXtst.so.6那个文件拷贝到那个目录下了,但是还是不能打开studio
2 年多之前 回复
bhdgx
bhdgx   2015.07.20 23:20
Arnold9009
Arnold9009   2015.07.21 10:58

执行sudo apt-get install libxtst-dev试试看

sinat_21595363
sinat_21595363 可以安装,但是貌似还是不能打开studio
2 年多之前 回复
qq_31020685
qq_31020685   2017.04.26 15:41

这个问题怎么解决的,楼主

Csdn user default icon
上传中...
上传图片
插入图片