Once the Android environment is configured, you can now build a simple Android project and experience one.
There are two ways to build an Android project: First, the IDE tools such as Eclipse, and the Android command build. The following are respectively described:
1.1. Build Android Project with Eclipse
1.1.1, file-new-android application Project, then go to the following interface:
Where application Name:android application name, that is, to generate APK and installed name, such as QQ, etc.
Project Name:android the name of the project (the folder that the Android project holds, the name that appears after the project imports IDE tools such as Eclipse)
Package Name: The path to the folder where the Java class file resides
Minimum Required SDK: apk for the Android app, minimum version of the SDK required for installation
Target SDK: apk for the Android app, the highest version of the SDK installed
Compile with: The version of the SDK that the Android project compiles to, or the most appropriate SDK version
Theme: Theme Selection, you can choose according to needs.
1.1.2, the top as required to complete, click Next, enter:
Create Custom launcher icon: Tick to set the display icon after application installation
Create activity: Tick this option to build an activity in Android project
Mark this paoject as a library: Tag this project for an Android library project instead of an Android project, Android Library project: Put the resources, jars, etc. used in some Android projects in the Library project, Can make Android engineering more concise, the library project is equivalent to a package, but this package is placed in the resources, jar packages and so on.
Create project in Workspace: After the project is created, the project's storage path
Working sets: The role is to classify items, tick, you can choose their corresponding working sets the project in the corresponding class, if there is no working sets, you can create a new (tick this option, click Select, enter the build interface, click New, Note type)
1.1.3, depending on the previous step selection, the following actions are also not the same:
1.1.3.1, if not check the Create custom Launcher icon selection, will not enter the icon settings interface
1.1.3.2, if the Create Activity option is not checked, clicking Finish does not build acticity
1.1.3.3, if you do not check the above two, then directly click Finish to complete the construction
1.1.3.4, if the above two all check, then first enter the icon settings interface, and then enter the Acticity create interface, the main input acticity and layout file name.
This completes the build of the Android project.
1.2. Create Android project with Android command
Shortcut key Win+r, open the Run window, enter cmd, and enter Android Create-n hello-t 6-p d:\
-K Com.shine.demo-a Helloactivity
-N Hello: That is the name of the Android project
The SDK version of the-T 6:android project (you can run the Android target List command to see the corresponding ID of each version of the SDK installed on your PC)
-P d:\: storage path for Android project
-K Com.shine.demo: Package name
-a helloactivity:android's activity name
After the project is created, right click on the project, run as configuration to enter the interface, you can choose to run the project, the class name, and choose to run the emulator.
Summary: It's best to use Eclipse and commands to build Android projects separately, compare and analyze which Android projects are necessary, and which are generated by the IDE, so you can get a clearer picture of the structure of Android engineering.
The establishment and analysis of Android engineering