Get the App
SLTechnology News&Howtos  ›  Development  › 

How to build Android Development Environment under Linux

Shulou Source: shulou.com Published: 2022-06-01 00:35:24 09月21日 Update

This article mainly introduces the relevant knowledge of how to build the Android development environment under Linux, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value. I believe you will gain something after reading this article on how to build the Android development environment under Linux. Let's take a look.

Effect picture:

Step into:

① because I am using deepin's system, there will be an openjdk8 in it. We can uninstall openjdk8 first. The uninstall method is available on the Internet, but I suggest that you back it up before uninstalling it.

There is no need to say much about ② downloading jdk,androdstudio,sdk.

③ can extract the jdk to the directory you want. If there are problems such as java_tool_options in the test, it must be that the openjdk that comes with the system has not been uninstalled.

④ unzips and installs androidstudio. These installations are very simple. Just find the studio.sh file in the directory. If there is no shortcut, you can refer to another blog post.

The most important step of ⑤: configure environment variables (fill in them according to your actual situation)

Add: export java_home=/usr/local/java/jdk1.8.0_152 (write your jdk path) export jre_home=/usr/local/java/jdk1.8.0_152/jre export path= $path:/usr/local/java/jdk1.8.0_152/bin:home/tim/develop/android/sdk/tools:/home/tim/develop/android/sdk/plat-toolsexport classpath=./:/usr/local/java/jdk1 at the end of the / etc/profile file . 8.0_152/lib:/usr/local/java/jdk1.8.0_152/jre/libexport android_sdk_home=/home/tim/.android/avd

After the environment variables are configured, androidstudio can work normally, but there may still be problems with the android simulator, often due to the incompatibility of the so library:

There are basically no mistakes after deletion. If you are right in the first place, do not delete these libraries.

All right, let's see what the final version looks like:

This is the end of the article on "how to build the Android development environment under Linux". Thank you for reading! I believe that everyone has a certain understanding of the knowledge of "how to build the Android development environment under Linux". If you want to learn more, you are welcome to follow the industry information channel.

Tags: Environment development knowledge content variables effects files directories articles systems if problems configuration important not used value blog reason backup actual Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Redmi macOS Shulou Technology Linux