Docker下安卓编译/bin/bash: java: command not found

Docker下在编译android环境时,java -version 命令明明能够正确表示java已经安装成功,环境设置正确。但是,在编译android时,检查java版本却通不过去:提示/bin/bash: java: command not found 问题,

软链接方法解决

sudo ln -s /jdk1.6.0_21/bin/jar /bin/jar

sudo ln -s /jdk1.6.0_21/bin/java /bin/java

sudo ln -s /jdk1.6.0_21/bin/javac /bin/javac

sudo ln -s /jdk1.6.0_21/bin/javah /bin/javah

sudo ln -s /jdk1.6.0_21/bin/javadoc /bin/javadoc
posted @ 2020-05-09 10:29  汪淼焱  阅读(1448)  评论(0编辑  收藏  举报