Android development--Eclipse builds development environment

好久没更新了,因为要准备考研,所以有些技术文章可能就没法如期更新,
但是有空还是会做一些小练习供大家一起学习,希望多多批评指正。


What I want to do today is the establishment of the Android development environment. Because there are classes in the school, I will simply write down the problems in my environment to avoid pitfalls.

Before setting up the environment, please make sure that you have a certain basic knowledge of Java. No matter which build method you choose, please make sure that the JDK version you need must be consistent with your eclipse , otherwise the software cannot be opened.

1. Fool-style installation (32-bit)

As the name suggests, SDK, JDK, adt, eclipse have been given to you, you only need to configure the 32-bit JDK and SDK environment variables.

1. Install and configure 32-bit JDK

Double-click the downloaded ( 32-bit JDK extraction code is m5y4) to install, click Next, and the first path that needs to be changed appears, that is, the path to install JDK,
Insert picture description here
and then the next step will let you install JRE
Insert picture description here
suggestions in the process It is placed in the same parent directory as the above JDK for easy management. My JDK installation path is as shown below

Insert picture description here
Is it very clear, the only failure is the failure to separate 64-bit and 32-bit.
Just continue to the next step, even if the JDK is installed. (There will be two folders after installation)

The next step is to configure the environment variables.
Because I installed the 64-bit version before, I have already configured JAVA_HOME and PATH. You only need to change the JAVA_HOME variable.
Insert picture description here
The following variable value is your JDK installation path, considering that some people have not configured it. , The following is the configuration of the path variable.
Insert picture description here
Just create two in the path, as shown in the figure above.
After configuration, enter in cmd javacand java-versiontest separately.
Reminder: When entering java-version, if Insert picture description here
something similar to this appears , it proves that your JDK is 32-bit, and if 64 appears , it is 64-bit.
At this point, the JDK is installed.

2. Configure SDK environment variables

The downloaded Eclipse and SDK are provided here, just configure them. After downloading and decompressing the resource (the extraction code is dylw), the
following folder will appear.
Insert picture description here
Start configuring environment variables

  • Create a new system environment variable, the variable name is ANDROID_SDK_HOME, the variable value is your SDK installation path (the path of the SDK in the above figure), here my installation path is E:\adt-bundle-windows-x86-20130729\sdk, such as The picture shows:
    Insert picture description here
  • Then add after the Path variable of the system ;%ANDROID_SDK_HOME%\platform-tools;% ANDROID_SDK_HOME%\tools, as shown in the figure:
    Insert picture description here
    If there is no such list type, just ;%ANDROID_SDK_HOME%\platform-tools;% ANDROID_SDK_HOME%\toolspaste it after the path variable.
    Then confirm all the way to exit, so that your environment variables are configured.
    Enter in the cmd window to adb versionview the SDK version information. If the
    Insert picture description here
    above appears, it means success.

3. Configure ADT plug-in and Android SDK in Eclipse

There is an eclipse folder in the decompressed folder, double-click to open eclipse.exe, the ADT in this has been configured and it Insert picture description here
has been configured, is it very detailed (haha), here SDK and ADT are both 22.0.5 It’s also very easy to check the installation status of the ADT plug-in. After entering Eclipse, click “help” and Insert picture description here
click the blue place. After entering, select the blue-ray what is already installed, you can check the plug-in information you installed, and Insert picture description here
then check whether the SDK is configured. Successfully
Insert picture description here
select the blue one, click in and find Android on the left, and
Insert picture description here
your SDK installation path will appear after you click it. Because the environment variables have been configured, it will be automatically displayed. If the SDK installation path does not appear in the SDK Location , configure it manually. But that's
it, the end of configuring environment variables

4. Test

Insert picture description here
Find this in eclipse, click the middle one, this will appear, because I have already configured an emulator, so there will be one here. Insert picture description here
Find the new on the far right and create a new Android emulator. The
Insert picture description here
parameters are shown in the figure and click OK
Insert picture description here
to see. It has one more, click on it with the mouse, and select start on the far right side, and
Insert picture description here
this will appear.
Directly click lanuch to
Insert picture description here
create
Insert picture description here
clang clang. It is successful. If you are using a certain dog music, it will also pop up the connected Android device very intimately. At this point, the fool-style installation is over.

2. Classic installation (original ecological installation) (64-bit)

1. JDK installation and configuration (reference one, the only difference is that the required JDK version is different)

JDK64 bit (extraction code kyvo)

2. SDK download and installation

You can go to the official website to download http://developer.android.com/sdk/index.html or go to this website to download http://www.androiddevtools.cn/ , this website looks like this after entering

Insert picture description here
Insert picture description here
Just select SDK Tools to download the latest one. After decompression, it will look like this
Insert picture description here

Double-click the SDK Manager to install the SDK, you will find dazzling, one word, install
Don’t be afraid, as long as the capacity is enough, download all and
Insert picture description here
choose what you need, you can click Install in the lower right corner to install, the wait will be long, not afraid, slow Slowly,
if you feel slow, you can use domestic mirroring

1. Mirror station address of the Chinese Academy of Sciences Open Source Association:
IPV4/IPV6: http://mirrors.opencas.ac.cn Port: 80

2. Mirror server address of Beijing University of Chemical Technology:
IPv4: http://ubuntu.buct.edu.cn/ Port: 80
IPv4: http://ubuntu.buct.cn/ Port: 80
IPv6: http://ubuntu.buct6 .edu.cn/ Port: 80

3. Mirror server address of Dalian Neusoft Institute of Information:
http://mirrors.neusoft.edu.cn Port: 80

Use this way,
Insert picture description here
Insert picture description here
then click close and restart the SDK Manager.
After the download is complete, configure the environment variables. Refer to Method One

2. eclipse configuration

I will not write how to download and install eclipse, but you need to find a version that suits your SDK and ADT, otherwise it will be incompatible

First, you need to install the ADT plug-in, or just
Insert picture description here
find the ADT plug-in for you on the website just now , but there are only two of them now, I have a lot of them in the network disk, you mention https://pan.baidu.com/s/ 1qH1wgQfdLeaCgm_uRwB7-g (extract code vfaf)
finished downloading**Never unzip**

  • Open eclipse, select this in the help below, (forgot, I installed 32-bit, can't open 64-bit, embarrassing) Insert picture description here
    reported me an error, it’s okay, I can, select this in help
    Choose “help” and Insert picture description here
    then choose “ add”.
    There will be two boxes that you need to fill in. The first one is “ADT”, and the second one is to choose the ADT compressed package you downloaded, and then Insert picture description here
    click next to
    install to complete the installation. Restart eclipse afterwards

The next step is to configure the SDK. Refer to Method 1, which is to configure the installation path of your SDK in Eclipse. It's that simple

Install the plug-in, configure the SDK, and test it. The test method also refers to the above.

Everything is correct, just go for it!


If there is any error over , please criticize and correct me, thank you.

Guess you like

Origin blog.csdn.net/qq_44787898/article/details/113970149