Chapter 1 Environmental Requirements
This is the first of our series of tutorials, let's install the Android development environment and run the Android SDK!
introduce
Welcome to the Android SDK Getting Started series. If you want to start developing Android apps, this series will teach you the skills you need from scratch. We're assuming you don't have any programming skills, of course, experience is of course better.
We will start by installing the Android development environment and develop a fully functional application. Android development requires a few different skillsets, but if you focus on one at a time, you'll have the solid foundation you need to develop. After starting the tutorial, we will go directly to the development process, and you will see the concrete results directly!
operating system requirements
Android development tools can run on most operating systems, including Windows XP, Vista, 7, 8, and Linux distributions Ubuntu 8.0.4 and above. If it is an Apple computer, you need to upgrade the system to OS X 10.5.8 above.
If you use a 64-bit version of Linux, it needs to be able to run 32-bit programs.
Download and install JDK6
In order to develop Android applications, you need to install the Java Development Kit (JDK), you can download JDK 6 or above.
On the Oracle Java download page, select Java SE, then choose the version that suits your operating system. You may need to register for an Oracle account, but this is free.
Download the ADT Toolkit
first step:
The ADT toolkit provides all the tools needed for Android development, including SDK, IDE, ADT plug-ins and many other tools. You can go to the official website of Android developers to download.
Step two:
If you chose Eclipse as your IDE, you need to install the ADT plugin.
After installing Eclipse, double-click to open it, and it will prompt you to choose a workspace, where your Android application code will be stored. In most cases you can manipulate Android files through Eclipse, but if you need to work directly with Android files, you need to remember the selected directory.
download update
first step:
You need to keep your Eclipse and ADT tools up to date. Open Eclipse and select Help - Check for Updates. The update may take some time, please be patient.
If there is an update, the following screen will appear, you can select the update you need, click "Next", and some authorization interface may appear, choose to accept.
Step two:
Open the Android SDK Manager to update the Android SDK and SDK tools. You can only choose the SDK you need to update, follow this tutorial, install a version of the SDK, and some tools are enough.
third step:
To stay updated, you can add the ADT toolkit update URL to Eclipse and have it check for you. Select Help - Install New Software from the menu bar. If the drop-down menu does not contain the URL below, enter it and click Add.
https://dl-ssl.google.com/android/eclipse/
Summarize
The above is the installation of the Android development environment. In the next article, we will be familiar with our IDE: Eclipse and Android Studio.
Chapter 2 IDE: A Quick Look at Eclipse
In this article, we will make an intimate contact with the most commonly used integrated development suite (IDE) Eclipse for Android development and the dedicated Android development IDE Android Studio. Let's start with Eclipse first.
How to see if an IDE is good? Of course, it is actually used to write a piece of code. Let's try to create an Android application now. Since we haven't officially started learning Android development, we don't need to pay too much attention to some details here, we only care about the performance of the IDE.
Create an Android project
Open Eclipse, click New, and a creation wizard will appear.
Expand the Android directory in the wizard, select Android Application Project, which is a necessary step to create an Android app, and select Next.
In the New Android Application interface, there will be a lot of settings here. When you click on the text box, a relevant prompt will appear below the text box. You can fill it out according to the figure below.
After filling it out, click Next, and another setting interface will appear, and the default options are generally sufficient.
Below you'll see the settings for the app icon, but for now you'll be fine with the default, which is a little green robot.
Then the following will let you create an Activity, just choose the default.
Then you will be asked to confirm, this is the last step, click "Finish", and you have created an Android project.
Using the Eclipse view
Now that we have an Android project, we can see how Eclipse behaves in developing Android applications.
On the left side of Eclipse is the Package Explorer (Package Explorer), which contains your project files. Here you should pay most attention to the src and res directories, which will be used in future development.
In the middle is the editing area, which displays all the files you have opened, such as the Activity you just created, where you mainly program.