Skip to content

Error: ENOENT: no such file or directory, open platforms/android/app/build/outputs/apk/debug/app-debug.apk #4002

@alvarofelipe12

Description

@alvarofelipe12

Description:

When i try to use the classic way to launch an ionic app into a device (ionic cordova run android --device) builds perfectly but native-run fails locating the app source file. The built app is in

platforms/android/build/outputs/apk/android-debug.apk

but the native-run goes to

platforms\android\app\build\outputs\apk\debug\app-debug.apk

looking for a folder called app inside android that does not exist

Steps to Reproduce:

Run ionic cordova run android --device

Output:

BUILD SUCCESSFUL

Total time: 18.968 secs
Built the following apk(s):
        D:/Projects/lvlLite-ionic4/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 PM1LHMA7C2202496
Error: ENOENT: no such file or directory, open 'D:\Projects\lvlLite-ionic4\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.

My ionic info:

Ionic:

   Ionic CLI                     : 5.0.0 (C:\Users\alvar\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 4.4.2
   @angular-devkit/build-angular : 0.12.4
   @angular-devkit/schematics    : 7.2.4
   @angular/cli                  : 7.2.4
   @ionic/angular-toolkit        : 1.3.0

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 6.3.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 10 other plugins)

Utility:

   cordova-res : not installed
   native-run  : 0.2.2

System:

   Android SDK Tools : 26.1.1 (C:\Users\alvar\AppData\Local\Android\Sdk)
   NodeJS            : v11.6.0 (C:\Program Files\nodejs\node.exe)
   npm               : 6.5.0-next.0
   OS                : Windows 10

Other Information:

My workaround to this was use

ionic cordova run android --no-native-run

and works as usual

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions