The tools that can be used for Android development include eclipse and Android studio, etc. Both of these tools have their own advantages and disadvantages. Studio is a development tool launched by Google, and we all know that Android is owned by Google, so it is better than eclipse. It is recommended for development and use, but everyone knows that Google is blocked in China, that is to say, it is not allowed. Go to the official website to download studio. At the beginning of everyone's study, it is recommended that everyone use eclipse. Many domestic companies still use eclipse to develop. But after learning, everyone must also master the development of studio. So today I will talk about how to use eclipse to build our Android development environment.
1. JDK (no need to install)
JDK is the environment in which the Java virtual machine runs
Students who have learned Java have configured the JDK before, so for those who are just getting in touch, they need to download and configure it. JDK official download address: http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html
When the download is complete, unzip it and put it where you want to put it
At this time we need to configure environment variables
1. Right click on My Computer –> Properties –> Advanced System Settings –> Environment Variables
As shown below:
2. Copy the directory where you decompressed the JDK, mine is: D:\Java\jdk1.8.0_91, then click New –> enter the variable name "JAVA_HOME" –> enter the variable value (that is, the directory where you decompressed the JDK)
JAVA_HOME=D:\Java\jdk1.8.0_91. As shown below:
3. Configure the CLASSPATH variable
CLASSPATH=.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\jre\lib\rt.jar
4. Configure the PATH variable
PATH=D:\Java\jdk1.8.0_91\bin;
PATH is already there, so we don’t need to create it, we need to select the PATH variable –> Edit –> New. As shown in the picture:
5. Verify
Run java -version in any directory
At this time, our JDK is configured!
2. Run eclipse ADT (no need to install)
Eclipse ADT official download address: http://www.eclipse.org/proposals/adt/
After downloading, unzip it to the directory you want (Note: It is best not to have Chinese)
Next, you need to configure environment variables
1. Configure an environment variable
ANDROID_HOME=D:\Java\adt-bundle-windows-x86_64-20140702\sdk
2. At this time, you need to open the SDK to download the required version
As shown in the picture:
I have already downloaded it here, so there is no need to download it again.
3. Run eclipse.exe directly
3. Download the hippocampus simulator
Eclipse ADT itself has its own simulator, as shown in the figure to open the built-in simulator:
At this time, we see that there is no one yet, so we click create to create one
Here you need to fill in your own AVD, device, target, cpu, skin and other information and click OK to complete the creation
At this time, you can see the AVD we just created, select it and click start
click launch
So here is a simulator that comes with our eclipse ADT
but! ! ! ! ! ! ! ! ! ! !
You can send that the one that comes with it is very laggy, so I recommend you to use the hippocampus simulator here. The speed of this can be said to be several times that of the one that comes with it. It is not an exaggeration at all! and better
Haimawan simulator official download address: http://droid4x.haimawan.com/?from=000000928
click to download
After the download is complete, install it. The installation is very simple. It is the installation of ordinary software, so I won’t talk about it here. After all, everyone is so smart!
After installation, we can start the hippocampus simulator
At this time, we need to see if it is detected in DDMS that you start the hippocampus simulator
If it is detected for so long, it can be used to run the Android program we wrote.
Of course, the hippocampus emulator is only updated to the Android 4.2 version, which is a defect of it.
If you think the hippocampus is not good, you can also use the Yeshen simulator, which is also a very good simulator, so I won’t explain it in detail here. . .
Four. Summary
1. JDK and eclipse ADT are beyond our choice, so we have no way to change them. Even if you use the studio, you need these configuration steps, and I will briefly explain it to you in the future.
2. For the AVD we run the program, we can use its own emulator, but it is very stuck. So I recommend everyone to use the Seahorse Simulator or the Night God Simulator, it is very fast and the interface is more beautiful
3. It is best for everyone to use both eclipse and studio, because now some companies use eclipse and some use studio, but one thing to note is that the codes edited by these two editor tools are not compatible with each other, and also That is to say, the code edited in eclipse cannot be run in the studio, and the code edited in the studio cannot be run in eclipse. Which tool to use depends on the requirements of the boss!
4. In the future, I will continue to update Android development gradually for a period of time, showing the most basic ones, and at the same time for the convenience of viewing. I hope everyone supports, thank you!