Cordova : Unable to install apk after upgrading android to 5.1.1 Nexus 5

你说的曾经没有我的故事 提交于 2019-12-03 09:06:40

问题


Unable to run apk on nexus 5 after upgrading to 5.1.1

Using Cordova: 5.0.0 Device : Nexus 5 Machine : MAC

BUILD SUCCESSFUL

Total time: 8.432 secs
Built the following apk(s):
    /Applications/XAMPP/xamppfiles/htdocs/android/kaljacobs/platforms/android/build/outputs/apk/android-debug.apk
Using apk: /Applications/XAMPP/xamppfiles/htdocs/android/kaljacobs/platforms/android/build/outputs/apk/android-debug.apk
Installing app on device...

/Applications/XAMPP/xamppfiles/htdocs/android/kaljacobs/platforms/android/cordova/node_modules/q/q.js:126
                    throw e;
                          ^
ERROR: Failed to launch application on device: ERROR: Failed to install apk to device:  pkg: /data/local/tmp/android-debug.apk
Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]

ERROR running one or more of the platforms: Error: /Applications/XAMPP/xamppfiles/htdocs/android/kaljacobs/platforms/android/cordova/run: Command failed with exit code 8
You may not have the required environment or OS to run this project

回答1:


I think you have this issue because the app is installed on your device with a different signature.

When you do cordova run android, the app is installed with a debug signature and maybe that signature changed when you changed target sdk or when you upgraded android.

The fix when you have INSTALL_FAILED_UPDATE_INCOMPATIBLE error is to first uninstall your app and then you should not have the issue any-more when launching cordova run android




回答2:


Don't worry about that.for NEXUS 5.go to Settings>> apps>> search application.

Well done..



来源:https://stackoverflow.com/questions/30502403/cordova-unable-to-install-apk-after-upgrading-android-to-5-1-1-nexus-5

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