Development environment setup
The current mainstream Android development environments include: ①Eclipse + ADT + SDK ②Android Studio + SDK ③IntelliJ IDEA + SDK Currently, most domestic developers still use Eclipse. However, after Google announced that it would no longer update ADT, and the official website also removed the Eclipse download link that integrates the Android development environment, various phenomena indicate that developers will eventually transition to Android Studio. Of course, this transition time will be long, but if you are just learning Android, it is recommended to start directly with Android Studio; and many excellent open source projects are based on Android Studio! Of course, both development environments will be introduced in this tutorial. Which one to use depends on you~ There is also IntelliJ, which is similar to Android Studio and does not explain this!
1.JDK installation and configuration
Step 1: Download JDKYou can download it from the official website: Jdk official download You can also download it from the author's network disk: Author's network disk PS: You can download any one of these, it doesn't matter, you can only download 32 bits for 32 bits!
Step 2: JDK installationFoolish next step is all you need!
#Step 3: Configuration of environment variablesConfiguring environment variables is to facilitate some of our command line operations, which will be used later! Right-click My Computer——>Advanced——>Environment Variables
##New JAVA_HOME Modify the PATH variable, don't delete the original stuff! ! ! !
- #New CLASSPATH
##Verify whether the environment configuration is complete
- Open the computer's cmd (command line), win key + R and enter cmd, then javac and java on the command line. The configuration is complete when the following effect appears:
##2. Choosing one of two development tools
At the beginning, I also talked about the current situation of the development environment IDE. In addition, I forgot to mention one thing earlier: Android Studio is more configuration-intensive. If the computer is not very good, it is recommended to use Eclipse first. For Android development, let’s first talk about the process of developing APP with IDE. Follow the following process to become familiar with the use of IDE:
Then choose one of the two below and start us. The road to Android development! Eclipse + ADT + SDK: Android Studio + SDK:
3. Analysis of related terms
4.ADB command line
##Dalvik: Android-specific virtual machine, different from JVM, Dalvik virtual machine The machine is very suitable for use on mobile terminals!
- ##AVD:
(android virtual machine): Android virtual device, which is the emulator of Android
- ADT:
##SDK:(android development tools)Android development tools
- (software development kit)Software development tools Package is a collection of tools for the Android system, platform architecture, etc., such as adb.exe
DDMS:- (dalvik debug monitor service) Android debugging tool
adb:- Android debugging bridge, in the platform-tools directory of sdk, has many functions and the command line is necessary
DX tool:- Convert .class to .dex file
(android asset packing tool),Android resource packaging tool##AAPT:
- is automatically generated by the aapt tool based on the resource files in the App, which can be understood as a resource dictionary
R.java file:
- app package name + component declaration + minimum version compatible with the program + required permissions and other program configuration files
AndroidManifest.xml:
- Following content for It may be a little difficult for you as a beginner, but when you look back later, you will find these things very useful~ If you don’t understand, you can skip some instructions in
Before executing the ADB instructions, we also need to configure the environment variables for our SDK
Step 1:
Create a new ANDROID_HOME environment variable and paste the sdk root directory address:%ANDROID_HOME%\tools;
Step 2:Update Path For environment variables, add:at the beginning of Paht. After the configuration is completed, let’s learn the instructions: 5. APP program packaging and installation process:
6. APP installation process:
##7. Summary of this sectionIn this section, we analyze the current situation of Android development IDE. It is recommended that beginners use Android Studio to develop Android APP if their hardware conditions permit. It also describes the installation and configuration of JDK, as well as the process of becoming familiar with IDE, and some key names. Analysis, common instructions of the ADB command line, and finally analysis of the package installation and installation process of the program! After this chapter, I believe everyone has a simple understanding of Android development, the process of developing a program, and the corresponding project directory structure! I believe everyone will complain that the emulator AVD runs very slowly. The next section will introduce you to the installation and use of Genymotion, an Android emulator that is faster than a real device!