https://blog.csdn.net/ipfpm/article/details/81132144
[Ubuntu] Ubuntu download the Android SDK versions with the configuration android24
(1) installation ADNORID SDk environment
https://developer.android.com/studio
1.1 Installation JAVA environment
https://cloud.tencent.com/developer/article/1162527
https://www.howtoing.com/how-to-install-java-with-apt-on-ubuntu-18-04
OpenJDK 8
Java 8 is long-term support version, although the Public Defender ended in January 2019, but still widely supported. To install the OpenJDK 8, execute the following command:
sudo apt install openjdk-8-jdk
This verification is installed
java -version
Can only install the JRE, you can execute sudo apt install openjdk-8-jre
.
OpenJDK 10/11
Ubuntu repository contains a package Java 10 or 11 installation. Prior to September 2018, the package will be installed OpenJDK 10. Once Java 11 release, the package will install Java 11.
To install OpenJDK 10/11, execute the following command:
sudo apt install openjdk-11-jdk
To install the JRE only, use the following command:
sudo apt install openjdk-11-jre
Next, let's look at how to install Oracle's official JDK and JRE.
1.2 Configuration JAVA_HOME
Set JAVA_HOME
Environment Variables
Many programs written in Java using JAVA_HOME
environment variables to determine the Java installation location.
To set this environment variable, first determine if Java is installed. Use update-alternatives
the command:
$ sudo update-alternatives --config java
This command displays each installation and the installation path of Java:
There are 3 choices for the alternative java (providing /usr/bin/java). Selection Path Priority Status ------------------------------------------------------------ * 0 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1101 auto mode 1 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1101 manual mode 2 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manual mode 3 /usr/lib/jvm/java-8-oracle/jre/bin/java 1081 manual mode Press <enter> to keep the current choice[*], or type selection number:
In this case, the mounting path is as follows:
- OpenJDK 11 located
/usr/lib/jvm/java-11-openjdk-amd64/bin/java.
- OpenJDK 8 is located
/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
. - Oracle Java 8 is located
/usr/lib/jvm/java-8-oracle/jre/bin/java
.
Copy the path from your desired installation. Then use nano
or your favorite text editor to open /etc/environment
:
$ sudo nano /etc/environment
At the end of this file, add the following line, be sure to use your own copy of the path to replace the highlighted route:
/etc/environment
JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64/bin/java"
All users modify settings on this file system will JAVA_HOME
route.
Save the file and exit the editor.
Now reload this file:
$ source /etc/environment
Verify that you have set the environment variable:
$ echo $JAVA_HOME
You will see the path just set:
/usr/lib/jvm/java-11-openjdk-amd64/bin/java
Other users need to execute commands source /etc/environment
or log off and log on to apply this setting.
1.3 Download
https://blog.csdn.net/opengl_es/article/details/80184519
After decompression, the emergence of tools directory, put it in an empty directory SDK to be installed, start the installation.
Second, the mounting assembly may be listed package
Use the shortcut keys CTRL + ALT + T to open the Console control terminal, go to the bin directory under the above extract from the tools directory, find sdkmanager,
Run the following command
./sdkmanager --list (../android list sdk obsolete)
Third, the mounting assembly package
Next, the contents of the column select PATH above installation, the following command:
$ ./sdkmanager "system-images;android-27;google_apis;x86"
./sdkmanager "double quotes is above path"
./sdkmanager "system-images;android-28;google_apis;x86_64 "
2 compiled opencv and opencv_contrib
https://www.cnblogs.com/klchang/p/7563494.html