which apk runs on the Android device ionic

2k views Asked by At

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

2

There are 2 answers

3
Mark Veenstra On BEST ANSWER

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

0
Nikola On

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.