0

I've just updated from cordova 3.6 to cordova 5 + cordova android 4.0.0 on a Windows computer.

Before the update, everything was working perfectly, but now if I run cordova run android, the app is not deployed to the device. (I get a success message from the CLI but nothing on the device)

I tried specifying or not the target device on the command line, it makes no change.

The device is seen from adb and adb commands work. I can deploy the app using android studio.

Here is what I get if I try to create and run a new project :

cordova create toto&&cd toto&&cordova platform add android&&cordova run android
Creating a new cordova project.
Adding android project...
Creating Cordova project for the Android platform:
        Path: platforms\android
        Package: io.cordova.hellocordova
        Name: HelloCordova
        Activity: MainActivity
        Android target: android-22
Copying template files...
Android project created with cordova-android@4.0.0
Discovered plugin "cordova-plugin-whitelist" in config.xml. Installing to the project
Fetching plugin "cordova-plugin-whitelist@1" via npm
npm http GET https://registry.npmjs.org/cordova-plugin-whitelist
npm http 304 https://registry.npmjs.org/cordova-plugin-whitelist
Installing "cordova-plugin-whitelist" for android
Running command: C:\temp\toto\platforms\android\cordova\run.bat
ANDROID_HOME=C:\Programmes\adt-bundle\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0
WARNING : No target specified, deploying to device '13352521650443'.
Running: C:\temp\toto\platforms\android\gradlew cdvBuildDebug -b C:\temp\toto\platforms\android\build.gradle -PcdvBuildArch=arm -Dorg.gradle.daemon=true
...
...
BUILD SUCCESSFUL

Total time: 38.159 secs
Built the following apk(s):
    C:\temp\toto\platforms\android\build\outputs\apk\android-debug.apk
Using apk: C:\temp\toto\platforms\android\build\outputs\apk\android-debug.apk
Installing app on device...
Launching application...
LAUNCH SUCCESS

LAUNCH SUCCESS but still nothing on the device.

QuickFix
  • 11,661
  • 2
  • 38
  • 50
  • possible duplicate of [Cordova "hello world" app won't display](http://stackoverflow.com/questions/30149970/cordova-hello-world-app-wont-display) – Rémi Becheras Jul 15 '15 at 14:40

1 Answers1

2

Ok, this other SO question and this one also have explanation for this issue. There is a bug open at Cordova : https://issues.apache.org/jira/browse/CB-8912

The issue is caused by the usage of -d option when launching adb install command. This option seems to be not supported by devices running android versions before kitkat (at least does not work in 4.0.4 and 4.1.2).

Community
  • 1
  • 1
QuickFix
  • 11,661
  • 2
  • 38
  • 50
  • I am running to this issue now as well. ADB see's the devices connected, CLI says it deploys to the device but its not loading on to the phone (and therefor not launching). The phone is Android 7, I am running Cordova 9.0 and cordova-Android@8.0. This just started happening in the middle of deploying the app multiple times to the same phone. I have rebooted the phone, restarted adb, ensured the phone's developer options are set properly....going to reboot my computer now to see if it can resolve the issue. – rolinger Sep 03 '20 at 15:24