Building an Android development environment under Linux

Building an Android development environment under Linux

[[169961]]

This article mainly introduces the construction of Android development environment under Ubuntu, and the IDE used is Eclipse (the same is true for Android Studio, and the steps of configuring SDK and installing adt plug-in can be omitted).

1. Install JDK

(1) JDK8 download address: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

(2) Select the Linux version to download. If you download a tar package, use the command #tar xvzf xxx.tar.gz to decompress it. If you download an rpm package, use rpm -ivh xxx.rpm to install it.

(3) Configure environment variables: Execute the command vi /etc/profile to edit the profile configuration file and add the following lines

  1. export JAVA_HOME="jdk path"
  2.  
  3. export PATH=$JAVA_HOME/bin:$PATH
  4.  
  5. export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

2. Install SDK

(1) Ubuntu x64 system needs to install 32-bit library files for compatibility with 32-bit programs

  1. sudo apt-get install -y libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1

(2) SDK download official website http://developer.android.com/sdk/index.html, domestic mirror http://gmirror.org/#android-sdk-tools-only

  1. #tar xvzf xxx.tar.gz

(3)

  1. $ sudo vim /etc/profile

Add the following content

  1. export PATH=/usr/ local /android-sdk-linux/tools:/usr/ local /android-sdk-linux/platform-tools:$PATH

3. Install eclipse

Download eclipse for linux version and install http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/neonr

4. Install the adt plugin

(1) Start Eclipse and select Help>Install New Software

(2) Click Add, enter "ADT" in Name and "http://dl-ssl.google.com/android/eclipse/" in Location. The adt version should be consistent with the sdk version.

(3) Configure the ADT plug-in

Select Window > Preferences, select Android in the list on the left, and specify the path to the SDK.

(4) Adding platforms and other components

Select Window > Android SDK Manager, select a Platform, and install.

<<:  A comprehensive review of mainstream VR engines at home and abroad: Which VR engine is the best?

>>:  There are reports that Apple may change the way it makes money and allow Android phones to be equipped with the iOS system?

Recommend

Information flow promotion strategy to improve conversion

Information flow is now widely used in e-commerce...

It’s obviously a “cat”, why is it called a “rabbit” or a “manta”?

Audit expert: Chen Yu Paleontological restoration...

The display effect of 4.7-inch iPhone 6 is like this

What will the iPhone 6 UI look like after it becom...

Full text of Li Ruigang's stunning speech: Subversion and Reshaping

I graduated from Fudan University in 1991 and fro...

How to optimize the fission process? Let the traffic burst

Recently some friends asked me how to do fission ...

How can a low-follower account achieve huge sales on Douyin?

In 2020, live streaming sales became the biggest ...

Why do some people get diarrhea when they are nervous?

Planning and production Source: A Brief History E...

Android Polarr Photo Editor Pro v5.10.4 All powerful features unlocked

Whether you are a beginner or a photography exper...

Do you remember all these things Apple did during Cook's era?

In August 2011, Steve Jobs, then CEO of Apple, an...