1.2 Setting Up the Development Environment
Category Android Basic Beginner Tutorial
>
The main Android development environments currently in use are:
- Eclipse + ADT + SDK
- Android Studio + SDK
- IntelliJ IDEA + SDK Most developers in China still use Eclipse. However, since Google announced it will no longer update ADT and has removed the Eclipse download link for integrated Android development environments from its website, it is evident that developers will eventually transition to Android Studio. Although this transition period will be long, if you are new to Android, it is recommended to start with Android Studio; many excellent open-source projects are also based on Android Studio! Of course, this tutorial will introduce both development environments, and you can choose which one to use. There is also IntelliJ, which is similar to Android Studio, but it will not be covered in this tutorial!
1. JDK Installation and Configuration
>
Step 1: Download JDK You can download it from the official website: JDK Official Download or from my cloud drive: My Cloud Drive PS: Any version will do, but 32-bit systems can only download 32-bit versions!
Step 2: JDK Installation Just follow the next steps in the installation wizard!
Step 3: Environment Variable Configuration Configuring environment variables is for convenience in command line operations, which will be used later! Right-click My Computer ——> Advanced ——> Environment Variables Create JAVA_HOME Modify the PATH variable, do not delete the original content!!!! Create CLASSPATH Verify if the environment is configured correctly Open the computer's cmd (command line), press win + R and enter cmd, then in the command line enter javac and java successively, and if the results appear as shown, the configuration is complete:
2. Choose One Development Tool
>
As mentioned earlier, the current state of development environment IDEs, and another point forgotten earlier: Android Studio is quite resource-intensive. If your computer is not very good, it is recommended to use Eclipse for Android development first. Below is the process of familiarizing yourself with IDE usage by following the steps:
Then choose one of the following to start your Android development journey!
Eclipse + ADT + SDK: Android Studio + SDK:
3. Explanation of Related Terms
>
-Dalvik: Android's unique virtual machine, different from JVM, it is very suitable for use on mobile terminals!
-AVD: (android virtual machine): Android virtual device, which is the Android emulator
-ADT: (android development tools) Android development tools
-SDK: (software development kit) Software development kit, which is a collection of tools for the Android system and platform architecture, such as adb.exe
-DDMS: (dalvik debug monitor service) Android debugging tool
-adb: Android debug bridge, located in the platform-tools directory of the sdk, with many functions, essential for command line
-DX tool: Converts .class files into .dex files
-AAPT: (android asset packing tool), Android resource packaging tool
-R.java file: Automatically generated by the aapt tool based on the resources in the App, can be understood as a resource dictionary
-AndroidManifest.xml: App package name + component declaration + minimum compatible version + required permissions, etc., the configuration file of the program
The following content may be a bit challenging for beginners, but looking back, you will find these things very useful~ If you don't understand, you can skip it for now
4. Some ADB Command Line Instructions
>
Before executing ADB commands, 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 the Path environment variable, add at the beginning of Path: **%ANDROID_HOME%\tools;** After configuration, let's learn the instructions:
5. APP Program Packaging and Installation Process:
>
6. APP Installation Process:
>
7. Summary of This Section
>
In this section, we analyzed the current state of Android development IDEs, recommended that beginners with adequate hardware use Android Studio for Android APP development, described the installation and configuration of JDK, and the process of familiarizing with IDEs, some key term explanations, common ADB command line instructions, and finally the packaging and installation process of programs! After this chapter,相信大家会对Android开发有了一个简单的了解,了解开发一个程序的流程,以及对应的项目目录结构!相信大家会抱怨模拟器AVD跑得很慢,下节会给大家介绍一个比真机还快的Android模拟器——Genymotion的安装使用!
- 1.2 开发环境搭建
-1.2.1 使用Eclipse + ADT + SDK开发Android APP
-1.2.2 使用Android Studio开发Android APP
-2.3.3 Button(按钮)与ImageButton(图像按钮)
-2.3.5.RadioButton(单选按钮)&Checkbox(复选框)
-2.3.6 开关按钮ToggleButton和开关Switch
-2.4.8 ListView之checkbox错位问题解决
-2.5.4 AutoCompleteTextView(自动完成文本框)的基本使用
- 2.5.5 Basic Usage of ExpandableListView (Collapsible List)
- 2.5.6 Basic Usage of ViewFlipper (Flip View)
- 2.5.7 Basic Usage of Toast
- 2.5.8 Detailed Explanation of Notification (Status Bar Notification)
- 2.5.9 Detailed Explanation of AlertDialog (Dialog Box)
- 2.6.0 Basic Usage of Several Common Dialogs
- 2.6.1 Basic Usage of PopupWindow (Floating Box)
- 2.6.2 Menu
- 2.6.3 Simple Usage of ViewPager
- 2.6.4 Simple Usage of DrawerLayout (Official Side Sliding Menu)
- 3.1.1 Event Handling Mechanism Based on Listeners
- 3.2 Event Handling Mechanism Based on Callbacks
- 3.3 Analysis of Handler Message Passing Mechanism
- 3.4 TouchListener vs OnTouchEvent + Multi-touch
- 3.5 Listening for Content Changes in EditText
- 3.6 Responding to System Setting Events (Configuration Class)
- 3.7 AsyncTask Asynchronous Task
- 3.8 Gestures
- 4.1.1 Introduction to Activity
- 4.1.2 Getting Started with Activity
- 4.1.3 Advanced Activity
- 4.2.1 Introduction to Service
- 4.2.2 Advanced Service
- 4.2.3 Mastering Service
- 4.3.1 Introduction to BroadcastReceiver
- 4.3.2 In-depth BroadcastReceiver
- 4.4.1 Introduction to ContentProvider
- 4.4.2 Further Exploration of ContentProvider – Document Provider
- 4.5.1 Basic Usage of Intent
- 4.5.2 Passing Complex Data with Intent
- 5.1 Basic Overview of Fragment
- 5.2.1 Fragment Example Analysis – Bottom Navigation Bar Implementation (Method 1)
- 5.2.2 Fragment Example Analysis – Bottom Navigation Bar Implementation (Method 2)
- 5.2.3 Fragment Example Analysis – Bottom Navigation Bar Implementation (Method 3)
- 5.2.4 Fragment Example Analysis – Bottom Navigation Bar + ViewPager Swipe to Switch Pages
- 5.2.5 Fragment Example Analysis – Simple Implementation of News (Shopping) App List Fragment
- 6.1 Data Storage and Access – File Storage and Reading
- 6.2 Data Storage and Access – SharedPreferences for Saving User Preferences
- 6.3.1 Data Storage and Access – Introduction to SQLite Database
- 6.3.2 Data Storage and Access – Further Exploration of SQLite Database
- 7.1.1 Android Network Programming Overview and HTTP Protocol Study
- 7.1.2 Study of Android HTTP Request Headers and Response Headers
- 7.1.3 Android HTTP Request Method: HttpURLConnection
- 7.1.4 Android HTTP Request Method: HttpClient
- 7.2.1 Android XML Data Parsing
- 7.2.2 Android JSON Data Parsing
- 7.3.1 Android File Upload
- 7.3.2 Android File Download (1)
- 7.3.3 Android File Download (2)
- 7.4 Android Calling WebService
- 7.5.1 Basic Usage of WebView (Web View)
- 7.5.2 Basic Interaction Between WebView and JavaScript
- 7.5.3 Considerations for WebView in Android 4.4 and Later
- 7.5.4 WebView File Download
- 7.5.5 WebView Cache Issues
- 7.5.6 WebView Handling Error Code Information from Web Pages
- 7.6.1 Network Basics Preparation for Socket Study
- 7.6.2 Socket Communication Based on TCP Protocol (1)
- 7.6.3 Socket Communication Based on TCP Protocol (2)
- 7.6.4 Socket Communication Based on UDP Protocol
- 8.1.1 Summary of 13 Drawable Types in Android Part 1
- 8.1.2 Summary of 13 Drawable Types in Android Part 2
- 8.1.3 Summary of 13 Drawable Types in Android Part 3
- 8.2.1 Comprehensive Analysis of Bitmap (Bitmap) Part 1
- 8.2.2 OOM Issues Caused by Bitmap
- 8.3.1 Detailed Explanation of Three Drawing Tool Classes
- 8.3.2 Practical Examples of Drawing Classes
- 8.3.3 Paint API – MaskFilter (Mask)
- 8.3.4 Paint API – Xfermode and PorterDuff Detailed Explanation (Part 1)
- 8.3.5 Paint API – Xfermode and PorterDuff Detailed Explanation (Part 2)
- 8.3.6 Paint API – Xfermode and PorterDuff Detailed Explanation (Part 3)
- 8.3.7 Paint API – Xfermode and PorterDuff Detailed Explanation (Part 4)
- 8.3.8 Paint API – Xfermode and PorterDuff Detailed Explanation (Part 5)
- 8.3.9 Paint API – ColorFilter (Color Filter) (1/3)
- 8.3.10 Paint API – ColorFilter (Color Filter) (2/3) -8.3.11 Paint API - ColorFilter (Color Filter) (3-3)
-8.3.12 Paint API - PathEffect (Path Effect)
-8.3.13 Paint API - Shader (Image Rendering)
-8.3.14 Paint Enumerations/Constants and ShadowLayer Shadow Effect
-8.3.15 Paint API - Typeface (Font Style)
-8.3.16 Canvas API Detailed (Part 1)
-8.3.17 Canvas API Detailed (Part 2) Clipping Methods Collection
-8.3.18 Canvas API Detailed (Part 3) Matrix and drawBitmapMesh
-8.4.1 Android Animation Collection - Frame Animation
-8.4.2 Android Animation Collection - Tween Animation
-8.4.3 Android Animation Collection - Property Animation - Introduction
-8.4.4 Android Animation Collection - Property Animation - Further
-9.1 Using SoundPool to Play Sound Effects (Duang~)
-9.2 MediaPlayer to Play Audio and Video
-9.3 Using Camera to Take Photos
-9.4 Using MediaRecord to Record Audio
-10.1 TelephonyManager (Phone Manager)
-10.2 SmsManager (SMS Manager)
-10.3 AudioManager (Audio Manager)
-10.5 AlarmManager (Alarm Service)
-10.6 PowerManager (Power Service)
-10.7 WindowManager (Window Management Service)
-10.8 LayoutInflater (Layout Service)
-10.9 WallpaperManager (Wallpaper Manager)
-10.10 Sensor Topics (1) - Introduction
-10.11 Sensor Topics (2) - Orientation Sensor
-10.12 Sensor Topics (3) - Accelerometer/Gyroscope Sensor
-10.12 Sensor Topics (4) - Understanding Other Sensors
-10.14 Android GPS Introduction
-11.0《2015 Latest Android Basic Tutorial》Completion Celebration~
-12.2 DrySister Look at Girls App (Version 1) - 2. Parsing Backend Data
-12.4 DrySister Look at Girls App (Version 1) - 4. Adding Data Caching (Introducing SQLite)
-12.5 DrySister Look at Girls App (Version 1) - 5. Code Review, Adjustment, and Logging Class Writing