1

My Cordova application is not launching through cordova run android command after updating the android platform to Cordova Android 4.0.0.

The project built successfully and says LAUNCH SUCCESS, but the app is not getting installed.

I'm using GenyMotion as the Emulator.

AvenashKrish
  • 343
  • 2
  • 6
  • 20
  • 1
    Even I was facing the same issue. Yet to find a fix, but for now you can try to run this command: `adb install -r platforms\android\build\outputs\apk\android-debug.apk` – Keval May 19 '15 at 20:25
  • Thanks @Keval. It worked! Looking for the auto launch fix – AvenashKrish May 19 '15 at 20:30

1 Answers1

1

The CLI of Cordova was the reason for this issue. From this answer:

Find this line of code:

 adb -s ' + resolvedTarget.target + ' install -r -d "' + apk_path + '"

and then remove -d option in the following 2 files:

  1. For cordova run android - platforms\android\cordova\lib\device.js - line 101, in Cordova 5.0.0
  2. For cordova emulate android - platforms\android\cordova\lib\emulator.js - line 311, in Cordova 5.0.0

Now you will see that the app does get installed on your device/emulator.

Community
  • 1
  • 1
Keval
  • 3,389
  • 2
  • 24
  • 41