Specific installation can see this address http://jingyan.baidu.com/article/b0b63dbfa9e0a74a4830701e.html
ADT Address: http://dl-ssl.google.com/android/eclipse/
- Select File-new-android Application Project
ApplicationName: The name is displayed when the app is installed on the phone.
Name of the project shown in Projectname:eclipse
PackageName: Package name. The Android system uses the package name to differentiate between the different biei programs. So the name of the package should be unique.
Minimum Required SDK: Minimum compatible version
TARGETSDK: Target version.
Compile with: Which version of the SDK will be used by the program to compile.
Theme: Subject, general election none.
Click Next
Continue Next
Choose Finish to create a simple Android project.
- Various parts of the Android program
SRC: Sprints to place Java code
Gen: The contents of this directory are automatically generated. There is mainly a R.java file
Assets: When the program is running, it can read the contents dynamically. If you use WebView to load the local page, all the pages are placed in this directory.
Bin: Files generated at compile time are placed here.
Libs: Generally put a third-party jar package
Res: All image, Layout, string and other resource files are placed in this directory.
Androidmanifest.xml: Configuration file
Project.Properties: When compiling, use the SDK version.
Folders that start with drawable are used to put pictures. So many folders are meant to make the program compatible with more devices. Under normal circumstances, put all the pictures under the drawable-hdpi red AH.
Folders that begin with values are used to place strings.
Layout folder: It is used to put the layouts file
Menu folder: Put the file
Connect your Android phone to your computer, and under Eclips's Window menu, open show View-other-android-devices
You can see a mobile connection.
Right-click the project name and select Runas-android application:
Then the program is installed and running on your phone.
Note: 1, when running the project, the phone can not lock the screen. Because some phones will ask if you want to install, if the lock screen, it will not install the timeout. 2. Before accessing the mobile phone, be sure to adjust the phone to developer mode. This allows the ADT to be plugged in. If you do not know how to adjust the phone to developer mode, you can ask Baidu Oh.
Let's take a look at the Strings.xml under values
There are two ways to reference a string in XML
1, in the code through the R.string.hello_world to reference
2. Referencing by @string/hello_world in XML
Where a string can be changed, such as a reference to a picture, you can replace it with drawable. The layout file can be replaced with layouts. And so on
- References to strings in the project
1. The app name is displayed after installing to the phone. In the Androidmanifest.xml file
2, open the app to enter the main screen display HelloWorld. In the Res-layout-activity_main.xml file
If you want the "Hello world!" display on the homepage Change to "Hello, welcome". Need to modify that place?
3-minute introduction to Android development