1
votes

I'm fairly certain the issue persists on all Android devices. However I can be wrong.

I get through the build process with no errors. I find the APK file in the proper folder but when I upload it via USB (not through CLI adb) to my Android (Galaxy S7 edge) it says "App not Installed" after having it go through trying to Install. I am not sure this has anything to do with the processor on my phone as I ran into a similar issue when installing apps made with RPG Maker MV. Right now I'm just (re)trying my hand on Android dev using ionic / Cordova rather than standard Java based Android development.

Note: I already have debug mode / unknown sources checked. The app itself works fine in web browser testing.

So main question: How do I get it to install?

Side question: Is there a way to tell ionic what version of Android I want to build for? (I have a few of the SDKs installed)

2

2 Answers

2
votes

OP's Feedback

cordova run android --device

Original Answer

  1. You need to create a debug version of apk using below CLI command.

    ionic run android --device
    
  2. Plug a device to the PC using USB

  3. Copy the android-debug.apk file to the device(apk path:.. \platforms\android\build\outputs\apk)

  4. After that, You have to enable below setting on your Android device.

settings --> general tab --> security --> unknown sources (enabled this)

  1. After that just double-clicked the android-debug.apk from the location which you have copied.Then your app will be installed on your device.
0
votes

i'm not sure if that command still works, but this worked for me

ionic cordova build --debug android