Android 1.2 development environment construction

Table of contents

 

1.2 Development environment construction

 

1. JDK installation and configuration

2. Choose one of the two development tools

3. Analysis of related terms

4. Some commands of the ADB command line

5. APP program packaging and installation process:

6. APP installation process:

7. Summary of this section


 

1.2 Development environment construction

 

The current mainstream Android development environments are: ①Eclipse + ADT + SDK ②Android Studio + SDK ③IntelliJ IDEA + SDK Now most domestic developers still use Eclipse, but after Google announced that it will no longer update ADT, and the official website also removes the integrated Android development environment Various phenomena indicate that developers will eventually transition to Android Studio. Of course, this transition time will be very long, but if you are just learning Android, it is recommended to start directly at Android Studio; and many excellent open source The projects are all based on Android Studio! Of course, both development environments will be introduced in this tutorial, which one to use depends on yourself~ There is also IntelliJ, which is similar to Android Studio, and it will not be explained!

1. JDK installation and configuration

  • Step 1: Download JDK You can go to the official website to download: Jdk official download You can also go to the author's network disk to download: The author's network disk PS: This can be the next one, it doesn't matter, 32-bit can only download 32-bit!

  • Step 2: JDK installation is the next step for fools!

  • Step 3: Configuration of environment variables The purpose of configuring environment variables is to facilitate some of our command line operations, which will be used later! Right click on My Computer --> Advanced --> Environment Variables

    c6f0dcb92cc839561a93f3bdbd87f8a1.jpeg

    New JAVA_HOME

    266866e00d4e4b50241f6357dbe180f6.jpeg

    Modify the PATH variable, don't delete the original thing! ! ! !

    356f3d4ce666558070a5d37edbb3b297.jpeg

    New CLASSPATH

    6dff33128010db28d54e86dfb5a49e28.jpeg

    Verify whether the environment configuration is complete Open the cmd (command line) of the computer, enter cmd with win key + R, and then javac and java in the command line, the effect shown in the figure shows that the configuration is complete:

    3b52a4f1077648d9bc223f7984e71ad1.jpeg


2. Choose one of the two development tools

At the beginning, I also talked about the status quo of the development environment IDE. In addition, I forgot to say something earlier: Android Studio is relatively expensive to configure. If the computer is not very good, it is recommended to use Eclipse for Android development first. Let me first talk about how we are familiar with IDE development APP Process, follow the following process to get familiar with the use of IDE:

 

2796477ff7481924f2302ae18124ab8c.jpeg

Then choose one of the following two to start our Android development road!

Eclipse + ADT + SDK: Android Studio + SDK:


3. Analysis of related terms

  1. Dalvik: Android-specific virtual machine, different from JVM, Dalvik virtual machine is very suitable for use on mobile terminals!
  2. AVD: (android virtual machine): Android virtual device, which is an Android emulator
  3. ADT: (android development tools) Android development tools
  4. SDK: (software development kit) software development kit, which is a collection of tools for Android system, platform architecture, etc., such as adb.exe
  5. DDMS: (dalvik debug monitor service) Android debugging tool
  6. adb: Android debugging bridge, in the platform-tools directory of sdk, has many functions, and the command line is necessary
  7. DX tool: convert .class to .dex file
  8. AAPT: (android asset packing tool), Android resource packaging tool
  9. R.java file: automatically generated by the aapt tool according to the resource files in the App, which can be understood as a resource dictionary
  10. AndroidManifest.xml: app package name + component declaration + program compatible minimum version + required permissions and other program configuration files

The follow-up content may be a bit difficult for you as a beginner, but when you look back later, you will find that these things are very useful~ If you don’t understand, you can skip it first

4. Some commands of the ADB command line

Before executing the ADB command, we also need to configure the environment variable for our SDK. Step 1: Create a new ANDROID_HOME environment variable, and paste the sdk root directory address:

24c220a4a618f414776c83a179c9d1fa.jpeg

Step 2: Update the Path environment variable, add at the beginning of Path: %ANDROID_HOME%\tools; to complete the configuration, and then learn the instructions:

eec92ec03409682b55c99c312b9d5166.jpeg


5. APP program packaging and installation process:

 

f872a188f1c3167a93012bd2349c2827.jpeg


6. APP installation process:

 

fa81fcb3bd5c8124dc7130ac537a34e8.jpeg

7. Summary of this section

In this section, we analyze the status quo of Android development IDE. It is recommended that beginners use Android Studio to develop Android APP if the hardware conditions permit. It describes the installation and configuration of JDK, the process of getting familiar with the IDE, and the analysis of some key names. , the common commands of the ADB command line, and finally the packaging and installation of the program and the analysis of the installation process! After this chapter, I believe that everyone has a simple understanding of Android development, the process of developing a program, and the corresponding project directory structure! I believe that everyone will complain that the emulator AVD runs very slowly. In the next section, I will introduce an Android emulator that is faster than the real machine - the installation and use of Genymotion!

 

Guess you like

Origin blog.csdn.net/2301_78835635/article/details/132602432