java - android studio java 以非零退出值 2 结束

标签 java android ubuntu

我在 ubuntu 16.04(32 位)中安装了 java jdk1.8.0_111 和 android studio,但是当我运行 android studio 时,我收到消息:

错误:进程'command'/usr/local/android-studio/jre/bin/java''以非零退出值 2 完成

print screen

我该怎么办?

最佳答案

我找到了解决方案。我认为 Android Studio 使用了 2 个 java 编译器,一个是 android studio 内置的,另一个是我为了安装 Android Studio 而安装的。

Android Studio 中,在菜单 File -> Project Structure 中:更改默认的 JDK 位置目录 到你自己的,在我的例子中它是:

/usr/local/android-studio/jre

更改

/usr/local/java/jdk1.8.0_111 #path_to_your_jdk

这是我安装的版本。

Picture of the window

关于java - android studio java 以非零退出值 2 结束,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40682698/

相关文章:

java - sublist(from,to).clear() 是否允许对 ArrayList 的清除部分进行垃圾回收?

java - 我如何获得xjc?

android - 如何从命令行构建 apache cordova 项目?

android - 响应为 204(无内容)时的 SSLHandshakeException

java - 如何判断app是否被 "Share-Via"调用?

linux - Unity3D如何在linux上设置图标

node.js - 如何安装 yeoman ?

java - 使用 Thymeleaf 时,Spring security sessionscope 似乎为空

linux - 使用 pcre 和 openssl 从源代码安装 NGINX 在 make 上抛出错误

java - 如何更改文本字段 javafx 中的字体颜色