OS used Ubuntu 16.10
Used board i.MX 6 DualLite SABRE-SD Board
See AndroidTM User's Guide
make produces the following error.
$ make 2> & 1 | tee build-log.txt
Checking build tools versions ...
************************************************** **********
You asked for an OpenJDK based build but your version is
Java version "1.8.0 _ 111" Java (TM) SE Runtime Environment (build 1.8.0 - 111 - b 14) Java HotSpot (TM) 64 - Bit Server VM (build 25. 111 - b 14, mixed mode).
************************************************** **********
build / core / main.mk: 231: *** stop.
Remarks
$ lunch sabresd_6 dq-user
doing so will change the version of java.
hara @ hara - XPS - 8300: ~ $ java - version
openjdk version "1.8.0 _ 131"
openJDK Runtime Environment (build 1.8.0 - 131 - 8 u 131 - b 11 --ubuntu 1. 16 - 10. 2 - b 11)
openJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
↓
hara @ hara - XPS - 8300: ~ / myandroid $ java - version
java version "1.8.0 _ 111"
java (TM) SE Runtime Environment (build 1.8.0 - 111 - b 14)
java HotSpot (TM) 64-Bit Server VM (build 25. 111-b 14, mixed mode)
How can I solve it?
The reson is you had set "JAVA_HOME" env, remove the env.
Hello,
see the link, please! Compiling Android 7.1.1 on ubuntu 16.04 platform.
Compiling Android7.1.1 BSP on Ubuntu16.04.2 LTS
Have a great day,
TIC weidong
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thank you for your reply.
I do the same operation as the site you pointed out.
However, I get an error.
In my opinion,
$ Lunch sabresd_6 dq-user
I think that it is caused by changing the java version from openjdk to oracle when doing the above.
Answer please.
I solved it by setting environment variables as below.
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$PATH:$JAVA_HOME/bin
export ANDROID_JAVA_HOME=$JAVA_HOME
Thank you for your response.