Which apk file runs on the Android device after the cli command ionic run android
? Where can I find this file inside my project?
To run your app, all you have to do is enable USB debugging and Developer Mode on your Android device, then run ionic cordova run android --device from the command line. Enabling USB debugging and Developer Mode can vary between devices, but is easy to look up with a Google search.
In Android Studio menu Main Menu -> Build Bundle(s) / APK(s) -> Build APK(s) . This then pops up a link with which you can open the file location.
Since the Ionic framework is the most popular cross-platform app development solution, over 5 million such applications have been created.
It includes the Android SDK, which will need to be configured for use in the command line. Android Studio is also used to create Android virtual devices, which are required for the Android emulator. Ionic apps can also be launched to a device.
Ionic provides a set of tools for building native iOS and Android applications, and mobile-ready Progressive Web Apps, using familiar web libraries, frameworks, and languages. Ionic Capacitor is a cross-platform native bridge that allows you to turn any web project into a native iOS or Android mobile application.
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With