问题描述
- 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)
解决方案
/usr/lib/jvm/jdk1.7.0_51/jre/lib/i386/xawt/libmawt.so: libXtst.so.6: 无法打开共享对象文件: 没有那个文件或目录
看下是不是少文件
解决方案二:
没装libXtst库,参考http://blog.csdn.net/maoxiang/article/details/5747109
解决方案三:
执行sudo apt-get install libxtst-dev试试看
时间: 2024-11-08 17:30:03