Android learning route (2) create an Android project, route android
An Android project contains all the files including the Android app code. The Android SDK provides default project directories and files to create a project.
This course will show you how to create a new project through Eclipse (including the ADT plug-in) or using the SDK tool on the command line.
Tip:You must install the Android SDK first. If you are using Eclipse, you must also install the ADT plug-in (version 22.6.2 or later ). If you do not have these, you can install them through the Android SDK Installation Wizard and then return to this course.
Create a project through Eclipse
- ClickNew.
- OpenAndroidFolder, selectAndroid Application ProjectAnd then clickNext.
Figure 1. The New Android App Project wizard in Eclipse.
- Complete the form in the window that appears:
ClickNext.
- Configure the project on this page. All items are default here, and then clickNext.
- This interface helps you create application icons.
You can customize an icon in multiple ways, and this tool can help you generate an icon for devices with all screen resolutions. You can customize an icon in several ways and the tool generates an icon for all screen densities. Before You release an application, make sure that your icon meets the Iconography specifications in the Image Design Guide ).
ClickNext.
- Now you can select an activity template to create your application.
In this project, selectBlankActivityThen clickNext.
- Keep the details of all the activities in the default status, and then clickFinish.
Your project is now a basic "Hello World" application and contains some default files. Run your application. continue to the next lesson.
Create a project using the command line tool
If you do not use Eclipse IDE that contains the ADT plug-in, instead, you can use the SDK tool in the command line to create your project:
- In the command line, change your directory
tools/
.
- Run:
android list targets
This will list all available Android SDK versions you have downloaded. Find a version you want to compile your application. Remember the target id. We recommend that you use the highest possible version. You can also support earlier versions of the system, but you need to set target to the latest version to optimize your application so that it can have a great user experience on the latest version of the device.
If you do not list any targets, you need to download them using the Android SDK Manager tool. View Adding Platforms and Packages.
- Run:
android create project --target <target-id> --name MyFirstApp \--path <path-to-workspace>/MyFirstApp --activity MainActivity \--package com.example.myfirstapp
Set<target-id>
Replace it with the id remembered in the previous step.<path-to-workspace>
You want to save the location of your Android project.
Your project is now a basic "Hello World" application and contains some default files. Run your application. continue to the next lesson (next lesson ).
TIPS:Setplatform-tools/
Andtools/
Add directoryPATH
Environment variable.
Android learning route
If java is done, it will be easier for android to learn.
Android BASICS (debugging in the Android development environment, Android Application structure, interface components and interface programming, and four main components)
Android intermediate (file IO and SQLite, graphics, images and animations, audio and video recording for playback, sensor programming, and GPS applications)
Android advanced (Network Programming and Web Service, OpenGL-ES 3D development, integration of Google services, using NDK development, java and c mutual calls)
How to Learn android programming?
1. "android Development Learning Roadmap" (search in Baidu) to learn about ANDORID programming.
2. Search for the "ppy2790 blog" in Baidu, a large number of Android learning materials, Android projects: videos for snake development, Android development for Sina Weibo, and Android client for jet flights
3. Go to the "IT learning resource station" to learn a large amount of IT learning materials, participate in study discussions, and interact with others.