android studio java用非零退出值2完成 [英] android studio java finished with non-zero exit value 2

查看:177
本文介绍了android studio java用非零退出值2完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了java jdk1.8.0_111并在ubuntu 16.04(32位)中安装了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:

错误:处理'命令'/ 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.

In Android Studio ,在菜单文件 - >项目结构将默认的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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆