在Ubuntu 16.04中安装Android Studio时出错

时间:2016-10-23 17:08:40

标签: android-studio ubuntu ubuntu-16.04

我正在尝试在ubuntu 16.04 LTS中安装android studio。 我下载了最新版本并使用

安装了jdk
sudo apt install openjdk-9-jre-headless

完成上述步骤后,我尝试在解压缩Android studio zip文件后运行./studio.sh,但它给了我以下错误。请帮忙。

com.intellij.ide.plugins.PluginManager$StartupAbortedException: java.lang.reflect.InvocationTargetException
    at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:96)
    at java.lang.Thread.run(Thread.java:745)
Caused by: 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:498)
    at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:93)
    ... 1 more
Caused by: java.lang.ExceptionInInitializerError
    at com.intellij.openapi.application.ApplicationNamesInfo.getInstance(ApplicationNamesInfo.java:49)
    at com.intellij.ui.AppUIUtil.getFrameClass(AppUIUtil.java:127)
    at com.intellij.ui.AppUIUtil.updateFrameClass(AppUIUtil.java:120)
    at com.intellij.idea.StartupUtil.prepareAndStart(StartupUtil.java:114)
    at com.intellij.idea.MainImpl.start(MainImpl.java:34)
    ... 6 more
Caused by: java.lang.RuntimeException: Cannot load resource: /idea/AndroidStudioApplicationInfo.xml
    at com.intellij.openapi.application.ApplicationNamesInfo.<init>(ApplicationNamesInfo.java:59)
    at com.intellij.openapi.application.ApplicationNamesInfo.<init>(ApplicationNamesInfo.java:30)
    at com.intellij.openapi.application.ApplicationNamesInfo$ApplicationNamesInfoHolder.<clinit>(ApplicationNamesInfo.java:43)
    ... 11 more
Caused by: java.io.FileNotFoundException: /idea/AndroidStudioApplicationInfo.xml
    at com.intellij.openapi.util.JDOMUtil.loadDocument(JDOMUtil.java:351)
    at com.intellij.openapi.application.ApplicationNamesInfo.<init>(ApplicationNamesInfo.java:55)
    ... 13 more

1 个答案:

答案 0 :(得分:0)

我在StackOverflow上看到了类似的问题。请不要在之前正式弃用之前安装Java 9。此版本仍处于开发过程中,可能非常不稳定

取消执行openJdk-9并在此帖后安装Oracle-jdk-8: http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html