"Original" development of the first Android program (Tutorial series stickers)

Source: Internet
Author: User
Tags android sdk manager

"People-oriented": Determined to develop all the people in Android, to truly start from the Zero Foundation;
"Tutorial description": This tutorial in the content of the guarantee original, concise, detailed, in the attachment link to ensure that the availability, the latest, complete;
"Reply Note": The tutorial has not clear place, please timely reply interactive, landlord will be the first time to update the post, I would like to open source, share, and go.

1, through the agent online Update SDK

Open the development folder created by Android 001 Tutorial, Android/develope, locate and double-click the SDK Manager.exe executable file

Wait a moment, automatically eject the Android SDK Manager Log window, the window is not configured Agent Money will show a variety of failure/rejection connection error messages

Little hint: Because Google is strong, do not do the agent is not updated Oh, this tutorial provides free IP and the end of the statement everyone update use

Open the Android SDK Manager menu tools/options, automatically eject the Android SDK manager-settings window

HTTP proxy server: Refers to the address of HTTP proxies

HTTP proxy port: refers to the address of the HTTP broker server

Tip: This tutorial provides free port, pro-test is available, select one line below, copy IP and port to the corresponding option

IP Port Location

108.165.33.4 3128 USA
71.96.39.147 80 United States Virginia Res
108.165.33.11 3128 USA
108.165.33.8 3128 USA
108.165.33.6 3128 USA
108.165.33.3 3128 USA
192.3.21.243 8118 North America region

Tip: After a successful configuration, the Android SDK Manager interface will list the Android 1.5 to 4.4 versions of the API package, if not displayed, then a different IP test
Tip: The above IP is only available temporarily, configure the way to permanently available proxies entry: High speed, stable, free, harmonious (configure permanent usage at once)

After configuring, in the Android SDK Manager interface, open menu packages, select Sort by Api level

Tick the corresponding packages, then click the button install package, select all the items, check the Accept, click Installed

Tip: If pop-up warning message let you choose, select No, slightly divided into minutes, the bottom of the interface progress bar will show the download speed and installation progress, all download and installation is estimated to 1 hours or so, by the pro-network speed of the installation of the decision.

2, configure the Eclipse environment, create the development of Android app

Open Eclipse Program: Open the Development folder created by Android 001 Tutorial, Android/eclipse, locate and double-click the Eclipse.exe executable file

Tip: This procedure is a general development operation

Set up workspaces: ADT Development Interface, open menu items: File/switch workspace/Other, workspace default selection for the workspace folder set up in our 001 tutorial, click OK, then ADK program to restart automatically, Automatically restarts Android projects that regret loading workspace workspaces

Load Update Complete SDK package: Java-adt Program Interface, open menu item, window/Preferences, select left menu Android, select Browser SDK directory

SDK Location: Browse to select the SDK directory under the development folder

After selecting the directory, you can browse to all Android API information, click OK, exit the current preferences interface

Create your first Android program: Java-adt interface, open menu item, File/new/project, select Android Application project under Android menu, click Next

A new window appears with a new window with three text boxes and 4 drop-down selection boxes.

Application Name: App Name

Project Name: Item names

Package Name: Packet name, also unique ID identification number

Minimum Required SDK: The minimum SDK version supported by your program, tutorial set default

Target SDK: The version of the SDK currently running the target program

Compile with: Current target program compiled SDK version

Theme: The theme style that comes with Android, choose Default

Tip: Fill out the Application Name, select the default, then default click 4 times Next and once completed, the program according to your options divided into minutes to complete, and then automatically enter the source interface, after the successful creation of the Package Explorer window will see the project's source information

3. Using the Android simulator to run the program

ADT Interface, open menu item in turn, window/android virtual Device Manager, go to Android virtual Device Manager

Tip: Android Virtual Device Manager: is an Android simulation manager for Visual management of Android app PC side

Current interface, select New, eject the AVD interface

AVD Name: Name, custom
Device: Devices, drop-down menus, recommended to select devices with lower resolution for testing, this tutorial uses 4.0 "WVGA (480 x 800:hdpi)
Target: Destination SDK, this tutorial chooses Android 2.3.3-api level 10
Cpu/abi: Instruction set, by default
Keyboard: Default check box, keyboard
Skins: Default Check, skin
Front camera: Front-facing camera, default
Back camera: Rear-facing
Memory Options: (RAM: 512 above recommended, VM Heap: System cache, recommendation 32)
Internal Storage: Phone storage, which is the amount of memory used when installing apps
SD card: (Size:,file phone external SD card, default is not filled
Emulation options: (Snapshot:,use Host GPU) emulation option

Tip: The snapshot in the Emulation option means "snapshot", which is able to save the state of the AVD when it is closed, and then the next time it starts, it shows the state of the last shutdown, similar to the caching mechanism. If you check what will happen, some small White said I clearly changed the code, ran no effect, or the original appearance, it is recommended to check this setting, this tutorial is not recommended. Using the Host GPU is a computer GPU, this tutorial does not recommend checking

The full name of the AVD:AVD is Android virtual device, which is the Android emulator that is running the VM and is recognized by Android. To build the Android to run, you must create an AVD, and you can configure a lot of running projects on each AVD

After filling out the options, click on Confirm, you can see the list of the Android Virtual Devices Manager interface more than one line just configured information

Android Virtual Devices Manager interface, click the button Start button, pop-up launch Options interface, pre-launch Information confirmation interface, click Launch, Android Simulator launch, the current debugging environment to simulate the real boot interface

Tip: The simulator is usually slow to run, mainly by the computer host configuration impact (the landlord is within 10 seconds to enter the program interface)

After the program is fully started. You can find that the simulator with the real phone, you can do some basic general operation, do not be happy too early, sharp-eyed has been aware of the new app just now, how to find it, yes, because there is no configuration currently like the start item information

ADT Interface, Package Explorer interface, select your currently new project right-click, select, Properties-run/debug settings, current interface Click the New button, select Android application, go to the Running Configuration window

Android:project Browse the current project, click Run, Wait a moment, pop up the Android simulator window, unlock and see your first Android app

Tips, you must feel not fun, yes, Android also provides other ways, such as real machine debugging, if you use the real machine configuration debugging Android program, look down

4, configure the real-machine debugging process

Preparation: First you need to have an Android phone, yes, also need a connecting cable, and then open the Android phone in the developer mode of USB debugging, finally the phone connected to the computer default installation driver,


ADK interface, open menu, run/Run Configuration interface, run config interface, select target in right box, tick always prompt to pick device

Click to run, pop up the Android Device Chooser interface, display your real machine configuration information in the check box list, left click on the real machine configuration, and then click the OK button, at this time, you go to check the mobile phone, the phone has been installed by default an Android program, that is, you built the Android app, Hello word!

5, if you see this step, you can already set up your own app, but don't worry, this is just beginning, not to be continued, welcome thread interaction.

Like to focus on me, inspirational to become a blog Park Daniel, haha

Original post transferred from: http://www.try8.cn/forum.php?mod=viewthread&tid=389

"Original" development of the first Android program (Tutorial series stickers)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.