解决:You asked for an OpenJDK based build but your version is java version "1.8.0_131" Java(TM) SE Run
本文链接:https://blog.csdn.net/yang_quan_yang/article/details/80340814
原因是:编译Android的源码时要安装 openjdk而不是jdk
1.下载openjdk:
*sudo apt-get install openjdk-8-jdk*
2.环境变量设置
1.sudo vim /etc/environment
*PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:$JAVA_HOME/bin"*
*export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib*
*export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64*
2.sudo vim /etc/profile
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH*
3. source /etc/environment /etc/profile
网友评论