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 VariablesJava环境变量配置1

  • ##New JAVA_HOME12299725.jpg Modify the PATH variable, don't delete the original stuff! ! ! !

    1.jpg

  • #New CLASSPATH

    2.jpg

  • ##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!

熟悉IDE开发APP的流程

Eclipse + ADT + SDK:

Android Studio + SDK:


3. Analysis of related terms

  1. ##Dalvik: Android-specific virtual machine, different from JVM, Dalvik virtual machine The machine is very suitable for use on mobile terminals!

  2. ##AVD:

    (android virtual machine): Android virtual device, which is the emulator of Android

  3. ADT:

    (android development tools)Android development tools

  4. ##SDK:
  5. (software development kit)Software development tools Package is a collection of tools for the Android system, platform architecture, etc., such as adb.exe

  6. DDMS:
  7. (dalvik debug monitor service) Android debugging tool

  8. adb:
  9. Android debugging bridge, in the platform-tools directory of sdk, has many functions and the command line is necessary

  10. DX tool:
  11. Convert .class to .dex file

    ##AAPT:
  12. (android asset packing tool),Android resource packaging tool
  13. R.java file:
  14. is automatically generated by the aapt tool based on the resource files in the App, which can be understood as a resource dictionary
  15. AndroidManifest.xml:
  16. app package name + component declaration + minimum version compatible with the program + required permissions and other program configuration files
  17. 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
4.ADB command line

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:

此处输入图片的描述
Step 2:
Update Path For environment variables, add:

%ANDROID_HOME%\tools;

at the beginning of Paht. After the configuration is completed, let’s learn the instructions: 常用ADB指令5. APP program packaging and installation process:


APP程序打包与安装的流程6. APP installation process:


##7. Summary of this section

APP的安装过程

In 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!