For now, Google Android is nothing new. Maybe everyone already has an Android phone. Maybe you know that the Android mobile phone interface is so gorgeous and easy to operate. Among them, a variety of applications are the most attractive places for Android phones. Now let's take a look: develop our own Android mobile app.
The first step is to build a development environment.ArticleThe network is uneven. This article serves as my study notes.
I chose the latest software here, and it does not need to be too serious:
- JDK 6:Http://www.oracle.com/technetwork/java/javase/downloads/index.html
- Eclipse 3.6:Http://www.eclipse.org/downloads/
- Eclipse plug-in ADT 0.9.9 online installation address: https://dl-ssl.google.com/android/eclipse/
- Andriod SDK:Http://developer.android.com/sdk/index.html
Download and install them one by one. Eclipse and Android sdks can be directly decompressed, for example, I put them in D: \ eclipse and D: \ Android-SDK-Windows.
1. Download the android Simulator
Open the decompressed Android-SDK-windows and run SDK manager. This is the SDK Management Center. Install and create the android simulator here. Click available packages to view the available SDK platform. Select the latest Android 2.2 and Android API 8, more than 70 MB. After downloading, you can create a simulator in the first virtual devices. ClickNew...Enter the simulator name, select Android 2.2-API Level 8 for target, and set SD card to 256 MIB. The rest are currently default. If you are interested, you can check what hardware actually has.
After creating the simulator, clickStart...After running, you can see the mobile phone interface.
2. Install the Eclipse plug-in ADT
- Run eclipse and selectHelp>Install new software.
- In the open available software window, clickAdd ....
In the name column, give the remote site a name, for example, Android plugin. Enter: https://dl-ssl.google.com/android/eclipse/ in the location column
Tip: If you have trouble downloading, try changing HTTPS to HTTP. ClickOK.
- Return to the available software window, select Android ddms and Android development tools, and clickNext.
- ClickNext, Agree to the installation protocol, clickFinish,Complete.
- Restart eclipse.
Copy the original text and translate the text here. You can click a few mouse clicks. It is easy to get started with eclipse. Enable after restartWindow> perferences> androidEnter the decompressed SDK path in SDK location, for example, D: \ Android-SDK-Windows.
3. Create an android Project
In eclipse, clickFile>New>Android Project.
- Set Project name to helloandroid.
- Android 2.2 is also selected for build target.
- Application name (Application name): for example, doroleapp
- Package name (package name): for example, Com. dorole
- Create activity (which can be understood as an activity Interface): for example, myactivity
4. Run in the simulator
You do not need to make any changes to the new project. Right-click the project name and selectRun>Android ApplicationThe previously created simulator will be opened. After unlocking, the application we wrote will run, and hello World and myactivity will be displayed on the screen. Now the android development environment has been set up. If you have a real machine, you can package the project into an APK and run it on your mobile phone. The full text is complete.
Official reference:
Http://developer.android.com/index.html(Cross)
Image:Http://androidappdocs.appspot.com/index.html(No traversal required)
Link:Http://dorole.com/370/
From:Dorole's blog
Posted in Android