[android] How to build an APK file in Eclipse?

When I develop the project using Eclipse, the APK file goes on the emulator. But I want to upload my application to a real device. Is there a tool to build an APK file?

What is the process? Or is it possible to pull the APK file from the emulator?

The answer is


The APK file is in the /workspace/PROJECT_FOLDER/bin directory. To install the APK file in a real device:

  1. Connect your real device with a PC/laptop.

  2. Go to sdk/tools/ using a terminal or command prompt.

  3. adb install <FILE PATH OF .APK FILE>

That's it...


For testing on a device, you can connect the device using USB and run from Eclipse just as an emulator.

If you need to distribute the app, then use the export feature:

alt text

alt text

Then follow instructions. You will have to create a key in the process.


We can a make a signed and unsigned APK file. A signed APK file can install in your device.

For creating a signed APK file:

  1. Right-click the project in the Package Explorer

  2. Select Android Tools -> Export Signed Application Package.

  3. Then specify the file location for the signed .apk.

For creating an unsigned APK file:

  1. Right-click the project in the Package Explorer

  2. Select Android Tools -> Export Unsigned Application Package.

  3. Then specify the file location for the unsigned APK file.


Eclipse 3.7 (Indigo): Go to Windows -> Preferences -> Android -> Build and uncheck "Skip packaging and dexing until export or launch"

Also, you can build it manually via Menu -> Project -> **Uncheck "Build automatically"**.


When you run your application, your phone should be detected and you should be given the option to run on your phone instead of on the emulator.

More instructions on getting your phone recognized: http://developer.android.com/guide/developing/device.html

When you want to export a signed version of the APK file (for uploading to the market or putting on a website), right-click on the project in Eclipse, choose export, and then choose "Export Android Application".

More details: http://developer.android.com/guide/publishing/app-signing.html#ExportWizard


The bin/XXX.apk file can be built automatically as soon as you save any source file:

Window/Preferences, Android/Build, uncheck "skip packaging and indexing..."


Right click on the project in Eclipse -> Android tools -> Export without signed key. Connect your device. Mount it by sdk/tools.


There is no need to create a key and so forth if you just want to play around with it on your device.

With Eclipse:

To export an unsigned .apk from Eclipse, right-click the project in the Package Explorer and select Android Tools -> Export Unsigned Application Package. Then specify the file location for the unsigned .apk.


Just right click on your project and then go to

*Export -> Android -> Export Android Application -> YOUR_PROJECT_NAME -> Create new key store path -> Fill the detail -> Set the .apk location -> Now you can get your .apk file*

Install it in your mobile.


No one mentioned this, but in conjunction to the other responses, you can also get the apk file from your bin directory to your phone or tablet by putting it on a web site and just downloading it.

Your device will complain about installing it after you download it. Your device will advise you or a risk of installing programs from unknown sources and give you the option to bypass the advice.

Your question is very specific. You don't have to pull it from your emulator, just grab the apk file from the bin folder in your project and place it on your real device.

Most people are giving you valuable information for the next step (signing and publishing your apk), you are not required to do that step to get it on your real device.

Downloading it to your real device is a simple method.


The simplest way to create signed/unsigned APKs using Eclipse and ADT is as follows:

  1. Right click your project in the "Project Explorer"
  2. Hover over "Android Tools"
  3. Select either "Export Signed Application Package" or "Export Unsigned Application Package"
  4. Select the location for the new APK file and click "Save".

    • NOTE: If you're trying to build a APK for beta distribution, you'll probably need to create a signed package, which requires a keystore. If you follow the "Signed Application" process in Eclipse ADT it will guide you through the process of creating a new keystore.

Hope this helps.


Examples related to android

Under what circumstances can I call findViewById with an Options Menu / Action Bar item? How to implement a simple scenario the OO way My eclipse won't open, i download the bundle pack it keeps saying error log getting " (1) no such column: _id10 " error java doesn't run if structure inside of onclick listener Cannot retrieve string(s) from preferences (settings) strange error in my Animation Drawable how to put image in a bundle and pass it to another activity FragmentActivity to Fragment A failure occurred while executing com.android.build.gradle.internal.tasks

Examples related to eclipse

How do I get the command-line for an Eclipse run configuration? My eclipse won't open, i download the bundle pack it keeps saying error log strange error in my Animation Drawable How to uninstall Eclipse? How to resolve Unable to load authentication plugin 'caching_sha2_password' issue Class has been compiled by a more recent version of the Java Environment Eclipse No tests found using JUnit 5 caused by NoClassDefFoundError for LauncherFactory How to downgrade Java from 9 to 8 on a MACOS. Eclipse is not running with Java 9 "The POM for ... is missing, no dependency information available" even though it exists in Maven Repository The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. on deploying to tomcat

Examples related to android-emulator

flutter run: No connected devices How to remove the Flutter debug banner? Android Studio AVD - Emulator: Process finished with exit code 1 Android Studio Emulator and "Process finished with exit code 0" Run react-native on android emulator ERROR Android emulator gets killed Error while waiting for device: Time out after 300seconds waiting for emulator to come online Unfortunately Launcher3 has stopped working error in android studio? updating Google play services in Emulator Android Studio emulator does not come with Play Store for API 23

Examples related to apk

Application Installation Failed in Android Studio Difference between signature versions - V1 (Jar Signature) and V2 (Full APK Signature) while generating a signed APK in Android Studio? Session 'app': Error Installing APK Android Error Building Signed APK: keystore.jks not found for signing config 'externalOverride' Build and Install unsigned apk on device without the development server? The APK file does not exist on disk Android Studio: Application Installation Failed How to retrieve Key Alias and Key Password for signed APK in android studio(migrated from Eclipse) ADB Install Fails With INSTALL_FAILED_TEST_ONLY Upload failed You need to use a different version code for your APK because you already have one with version code 2

Examples related to android-install-apk

Cannot install signed apk to device manually, got error "App not installed" Android App Not Install. An existing package by the same name with a conflicting signature is already installed How to Sign an Already Compiled Apk How to run (not only install) an android application using .apk file? Android Failed to install HelloWorld.apk on device (null) Error How do I solve the INSTALL_FAILED_DEXOPT error? How to build an APK file in Eclipse? What is INSTALL_PARSE_FAILED_NO_CERTIFICATES error?