How to build an APK file in Eclipse?
AndroidEclipseAndroid EmulatorApkAndroid Install-ApkAndroid Problem Overview
Android Solutions
Solution 1 - Android
When you run the project on the emulator, the APK file is generated in the bin
directory. Keep in mind that just building the project (and not running it) will not output the APK file into the bin
directory.
Solution 2 - Android
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:
Then follow instructions. You will have to create a key in the process.
Solution 3 - Android
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.
Solution 4 - Android
The APK file is in the /workspace/PROJECT_FOLDER/bin
directory. To install the APK file in a real device:
-
Connect your real device with a PC/laptop.
-
Go to
sdk/tools/
using a terminal or command prompt. -
adb install <FILE PATH OF .APK FILE>
That's it...
Solution 5 - Android
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.
Solution 6 - Android
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:
-
Right-click the project in the Package Explorer
-
Select Android Tools -> Export Signed Application Package.
-
Then specify the file location for the signed .apk.
For creating an unsigned APK file:
-
Right-click the project in the Package Explorer
-
Select Android Tools -> Export Unsigned Application Package.
-
Then specify the file location for the unsigned APK file.
Solution 7 - Android
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
Solution 8 - Android
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..."
Solution 9 - Android
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".
Solution 10 - Android
The simplest way to create signed/unsigned APKs using Eclipse and ADT is as follows:
-
Right click your project in the "Project Explorer"
-
Hover over "Android Tools"
-
Select either "Export Signed Application Package" or "Export Unsigned Application Package"
-
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.
Solution 11 - Android
Right click on the project in Eclipse -> Android tools -> Export without signed key. Connect your device. Mount it by sdk/tools.
Solution 12 - Android
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.