Preloader
Cordova
  • Estimated reading time: 1 Minute

Compiled cordova android app is built succesfully but doesn't start in android < 4.2

This problem is very annoying and happens only with some users, not all the cordova developer seems to present this error.

You'll only receive this "magic" information :

BUILD SUCCESSFUL

Total time: 3.43 secs
Built the following apk(s):
    C:\android\myproject-hello\platforms\android\build\outputs\apk\android-debug.apk
Installing app on emulator...
Using apk: C:\android\myproject-hello\platforms\android\build\outputs\apk\android-debug.apk
Launching application...
LAUNCH SUCCESS

That can make you crazy ! Fortunately the solution is really simple.

We will edit 2 javascript files, the emulator and device files which are the cause of the problem. If you are testing on emulator, you can edit only the emulator file and if you are using a device then edit only the device file, but if you want , you can edit both of them for future ocations.

Locate :

// edit this if you test your app with a device
platforms\android\cordova\lib\device.js

// Edit this if you test your app with emulator
platforms\android\cordova\lib\emulator.js

Then search this line : 

(on device.js is near at the line 102 and on emulator.js is near at the line 313)

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

And replace with :

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

You only need to remove the "-d" option, then the app will run normally with cordova run android.

Share:
Carlos Delgado

Carlos Delgado

Senior Software Engineer at Corvix. Interested in programming since he was 14 years old, Carlos is a self-taught programmer and founder and author of most of the articles at Our Code World.

Weekly trending
Top 16 Social Media App Development Companies in Denver in 2026
10 Sep, 2026
  • Estimated reading time: 7 Minutes
6 Best Tools for Building an AI Software Factory
10 Sep, 2026
  • Estimated reading time: 9 Minutes
Best Tools for Advancement and Donor Engagement
10 Sep, 2026
  • Estimated reading time: 5 Minutes
Where the Cloud Actually Lives
10 Sep, 2026
  • Estimated reading time: 6 Minutes
Our Sponsors

Our blog is proudly supported by industry-leading sponsors.