5

Which apk file runs on the Android device after the cli command ionic run android? Where can I find this file inside my project?

Nikola
  • 14,888
  • 21
  • 101
  • 165
PhiceDev
  • 507
  • 2
  • 6
  • 22

2 Answers2

6

The exact path can be a little different per Cordova version, but if you want to get the exact path, take a look at the output when running ionic run android. At the end you'll see something like:

BUILD SUCCESSFUL

Total time: 10.66 secs
Built the following apk(s):
    /home/myuser/Documents/Projects/mysuperapp/platforms/android/build/outputs/apk/android-debug.apk
Using apk: /home/myuser/Documents/Projects/mysuperapp/platforms/android/build/outputs/apk/android-debug.apk
Installing app on device...
Launching application...
LAUNCH SUCCESS

Notice the output with the text Using apk:. This display's the complete path to the APK used installing on the device. In my case /home/myuser/Documents/Projects/mysuperapp/platforms/android/build/outputs/apk/android-debug.apk

EDIT:

If you want to create an APK for production usage / release into the Play Store, make sure to follow the next steps: http://ionicframework.com/docs/guide/publishing.html

Mark Veenstra
  • 4,691
  • 6
  • 35
  • 66
  • Curios, why is the apk file named android-debug? Is this not the production ready file? Am I doing something wrong, like to bundle it for running not testing. – alphapilgrim Mar 07 '16 at 15:19
  • 1
    We are using Ionic on top of Cordova and they released some documentation on how to generate a signed APK for Play Store: http://ionicframework.com/docs/guide/publishing.html – Mark Veenstra Mar 07 '16 at 15:21
  • We as well are using the same stack, thank you for quick response and a perfect one too! – alphapilgrim Mar 07 '16 at 15:26
1

I would say it's platforms\platform\CordovaApp-debug.apk if you haven't changed any additional options.

Where platform is android or ios, depending again on your settings.

Nikola
  • 14,888
  • 21
  • 101
  • 165