I can't able to install app-debug.apk into my phone

Viewed 7152

I used cordova version@6 with JDK 1.8 or greater but there are still I'm able to run an app on my android mobile

I try to run ionic Cordova run android and so try to remove and reinstall the ionic Cordova platform android

BUILD SUCCESSFUL

Total time: 1 mins 18.416 secs
Built the following apk(s):
        E:/Aproject/Project file/thenationaltv app/mynationaltv/platforms/android/build/outputs/apk/android-debug.apk
> native-run.cmd android --app platforms\android\app\build\outputs\apk\debug\app-debug.apk
No hardare devices found, attempting emulator...
Selected emulator HKE839LB
Error: ENOENT: no such file or directory, open 'E:\Aproject\Project file\thenationaltv app\mynationaltv\platforms\android\app\build\outputs\apk\debug\app-debug.apk'
[ERROR] An error occurred while running subprocess native-run.

        native-run.cmd android --app platforms\android\app\build\outputs\apk\debug\app-d... exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.
2 Answers

Delete the android folder present in platform directory.

  1. ionic cordova platform add android
  2. ionic cordova build android

then run

ionic cordova run android --no-native-run

Have you enabled development mode on your device? Otherwise you won't be able to setup an adb connection or install APK's outside the play store.

The exact steps to enable the development mode might slightly differ between brands, but narrows down something like this:

  • Go to Settings
  • Go to About this phone
  • Find the Androir build number, and tap on it seven times
  • You'll see a confirmation that development mode is enabled

Sometimes you also need to go into developer settings and enable "Install APK outside the appstore" and "Enable USB Debugging".

Related