A New project:
- Open Eclipse, select File–new–android application Project
- Enter the project name, program name, and package name. The package name cannot be duplicated, it is the item's only indicator and I understand it as a GUID.
3. Create client icon, create activity, select Workspace
4. Configure desktop boot images, which can be skipped
5. Next, Direct Finish
Two Directory structure
- SRC Java program source file
- Gen tools are automatically generated, and the code farmer will not meddle.
- File path generated after the bin program is run
- Library files used by the Libs project
- Res Program resource File
- Adrodimanifest.xml manifest file
- Proguard-project.txt Ignore it
- Project.Properties program supported Android version, temporarily ignore it
Note: There is a appcompat_v7 in the project, it is Google's own Compatibility Pack, do not ignore it.
There are two folders which I need to record in order to avoid forgetting------------------------
There is a R.java under the Gen folder, which corresponds to the IDs of the various resources under the Res folder, which can be found by this ID.
Res folder is the program's resource file, compared to slices, text, XML files, movies, animations, etc., when we add text or pictures to the res file, the R.java file automatically records the ID of the text or picture.
Res folder under the
Drawable for storing pictures. Different versions of a picture can be made according to the resolution of different phones. H m L corresponds to high school low resolution respectively.
Layout is used to store the displayed interface.
The Values text. When the text content is more, can be saved by file
Three Run
Program Default Build Interface
1. Open the simulator AVD
2. creat (Create) simulator
AVD Name: Any
Device: Selected devices will set the screen size according to the device
Target: Version supported for Android OS
SD Card: The size of the memory card, it will be based on the size of the code farm to create a local image file of the same size. When we use it for the first time, we can create it and use it again to select File and find it.
3. Running the simulator
Select the emulator you just created, and click the Start button. You can click Launch directly, or you can reset the screen size, and then click Launch.
Note: This process to spell PC hardware, slowly drip, slowly drip, waiting for ha, go to Dinner (^o^)/~
4. Display the Phone interface
5. Project right-click-run as-android Application
If you want to see the installation, you can choose the menu Windows–show view–other–logcat
LogCat views not only view the installation, but also see the different levels of errors Oh
Android First Experience--helloword