Cordova does not actually install app on android device

徘徊边缘 提交于 2019-12-03 12:29:21
Humppakäräjät

Seems to be a bug in Cordova 5.0.0, I had the same problem and the answer by proprit in this thread solved it for me:

On Cordova 5.0.0, adb commands to install the apk can be found at line 101 of file platforms\android\cordova\lib\device.js (and at line 311 of platforms\android\cordova\lib\emulator.js for cordova emulate android):

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

Current command returns to me: "Error: unknown option -d"! If you simply delete the "-d" option, applications run normally with cordova run android.

cordova build

adb push "<<project_path_here>>\platforms\android\build\outputs\apk\android-debug.apk" /sdcard/

adb shell pm install -r /sdcard/android-debug.apk

And then you can find your app in your phone and run it ;D

cordova emulate android

works for the latest version as of this date.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!