Click here to Skip to main content
Click here to Skip to main content

Android Development - Running Android App

By , 10 Dec 2012
 

Introduction

With reference to the previous post we have successfully made the sample android app and now we need to run it, For running your apps there are two possible ways

  • Running on the emulator
  • Running on a device

Running on the emulator

Emulator are the Android Virtual Devices (AVD) that we need to configure in order to run our android apps.

Step 1

Open AVD Manager

506625/Running-on-the-emulator.jpg

Step 2

Click on New Button to add a new device, and configure your device settings.

506625/configure-your-device-settings.jpg

Step 3

There will be a result window showing all the configuration you had chosen on the previous screen.

506625/Android-Virtual-Devices-Manager.jpg

Step 4

Press 'Ok' and you will see your device listed in there and now you can close this window now.

506625/Android-Virtual-Devices-Manager1.jpg

Step 5

Run your android app project from eclipse and if there is only one AVD configured it will automatically deploy the app to it else a window will appear to choose your AVD. Emulator will start.

506625/AVD-Emulator.jpg

Running on the Device

Android app can directly be deployed on the android device, for this few configurations are needed.

Step 1

Set the application in the debug-able mode by setting android:debuggable attribute of the <application>element to true. For ADT 8.0 this is done by default. (In our ADT we do not need to perform this step).

Step 2

Enable USB debugging on your device: For Android 3.2 or older Goto Settings>Applications>Development and enable USB Debugging.

506625/Development-and-enable-USB-Debugging.jpg

On Android 4.0 and newer, it's in Settings > Developer options.

Note: On Android 4.2 and newer, Developer options is hidden by default. To make it available, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options.

Step 3

Install USB drivers for your device so that the computer recognizes your device.

Step 4

Once set up and your device is connected via USB, install your application on the device by selecting Run > Run (or Run >Debug) from the Eclipse menu bar.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

ShubhamSaxena
Student Stalwart Vision
India India
Member
I'm pursuing B.Tech from Hindustan College of Science and Technology, I'm also a Microsoft Student Partner.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
GeneralMy vote of 1memberSelvin11 Dec '12 - 4:49 
there is no need to rewriting d.android.com Running Your App[^]

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web03 | 2.6.130523.1 | Last Updated 10 Dec 2012
Article Copyright 2012 by ShubhamSaxena
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid