Android Development – environment construction (Graphic explanation)
The tools available for Android development include eclipse and Android studio, both of which 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 will be better than eclipse. It is recommended to develop and use, but we all know that Google is blocked in China, that is, you can't go to the official website to download studio. At the beginning of your study, it is recommended that you use eclipse. Many domestic enterprises still use eclipse for development. But after learning, we should also master the development of studio. So today I'll talk about how to use eclipse to build our Android development environment.
1、 JDK (no installation)
Is the environment in which the Java virtual machine runs
Students who have studied java have configured the JDK before, so those who have just started to contact need to download and configure it. JDK download address: http://www.jb51.net/softs/75615.html
When we download it, unzip it and put it where we want to put it
At this time, we need to configure environment variables
1. Right click my computer -- > properties -- > advanced system settings -- > environment variables
As shown below:
2. Copy the directory where you unzipped the JDK. Mine is in 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 unzip the JDK)
JAVA_ HOME=D:\Java\jdk1.8.0_ 91。 As shown below:
3. Configure classpath variable
CLASSPATH=.;% JAVA_ HOME%\lib\dt.jar;% JAVA_ HOME%\lib\tools.jar;% JAVA_ HOME%\jre\lib\rt.jar
4. Configure path variable
PATH=D:\Java\jdk1.8.0_ 91\bin;
Path is original, so we don't need to create it. We need to select the path variable -- > Edit -- > create. As shown in the figure:
5. Check
Run Java - version from any directory
At this time, our JDK will be configured!
2、 Run eclipse ADT (no installation)
Eclipse download address: http://www.jb51.net/zt/eclipse.html
After downloading, unzip it to the directory you want (Note: it's 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 figure:
I have already downloaded it here, so I don't need to download it again.
3. Run eclipse.exe directly
3、 Download hippocampal simulator
Eclipse ADT has its own simulator, as shown in the figure below. Open the built-in simulator:
If you don't see it yet, click create to create one
Here, 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 eclipse ADT
But!!!!!!!!!!!
You can send your own is very Caton, so here we recommend you to use the hippocampal simulator. It can be said that the speed is several times that of your own, which is no exaggeration! And it works better
Hippocampal simulator download address: http://www.jb51.net/softs/244296.html
After downloading, install it. The installation is very simple, that is, the installation of ordinary software, so I won't say it here. After all, everyone is so smart!
Once installed, we can start the hippocampal simulator
At this time, we need to see if it is detected in DDMS that you start the hippocampal simulator
If it has been detected for so long, it can be used to run the Android program we wrote
Of course, the hippocampal simulator is only new to Android 4.2, which is a defect of it.
If you think the hippocampus is bad, you can also use the night God simulator, which is also a good simulator. I won't explain it in detail here...
4、 Summary
1. JDK and eclipse ADT are not our choices, so we have no way to change them. Even using studio requires these configuration steps, which will be explained briefly in the future.
Is too laggy. 2. For the AVD we run, we can use the simulator it contains, but it is very stuck. Therefore, it is recommended that you use hippocampal simulator or nocturnal simulator, which is fast and has a beautiful interface
3. You'd better use both eclipse and studio, because now some enterprises use eclipse and some use studio, but one thing to note is that the code edited by the two editor tools is incompatible with each other, that is, the code edited in eclipse cannot be run in studio, and the code edited in studio cannot be run in eclipse, Which tool to use depends on the boss's requirements!
4. In the future, I will continue to update Android development gradually for a period of time to show the most basic ones. At the same time, it is also convenient for me to view them. I hope you support, thank you!
Original link: http://www.cnblogs.com/xiao-chuan/p/6066227.html
The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.