android studio java 以非零退出值 2 结束 [英] android studio java finished with non-zero exit value 2
问题描述
我在 ubuntu 16.04(32 位)中安装了 java jdk1.8.0_111 并安装了 android studio,但是当我运行 android studio 时我收到消息:
I installed the java jdk1.8.0_111 and installed android studio in ubuntu 16.04 (32 bits), but when I run android studio I get the message:
Error:Process 'command '/usr/local/android-studio/jre/bin/java'' 以非零退出值 2 结束
我该怎么办?
推荐答案
我找到了解决方案.我认为 Android Studio 使用了 2 个 java 编译器,一个是从 android studio 内置的,另一个是我为了安装 Android Studio 而安装的.
I found the solution. I think Android Studio was using 2 java compilers, one built-in from android studio, and the other the one that I had installed in order to install Android Studio.
在 Android Studio 中,在菜单 File -> Project Structure 上:将默认的 JDK 位置目录更改为您自己的,就我而言它是:
In Android Studio, On the menu File -> Project Structure : change the default JDK location directory to your own, in my case it was:
/usr/local/android-studio/jre
/usr/local/android-studio/jre
而我改变了为
/usr/local/java/jdk1.8.0_111 #path_to_your_jdk
/usr/local/java/jdk1.8.0_111 #path_to_your_jdk
这是我安装的版本.
这篇关于android studio java 以非零退出值 2 结束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!