Cordova:将android升级到5.1.1 Nexus 5后无法安装apk [英] Cordova : Unable to install apk after upgrading android to 5.1.1 Nexus 5

查看:1064
本文介绍了Cordova:将android升级到5.1.1 Nexus 5后无法安装apk的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

升级到5.1.1后无法在nexus 5上运行apk

Unable to run apk on nexus 5 after upgrading to 5.1.1

使用Cordova:5.0.0
设备:Nexus 5
机器:MAC

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




推荐答案

我认为你有这个问题,因为应用程序安装在您的设备上有不同的签名。

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

该应用程序安装了调试签名,也许在更改目标sdk或升级android时更改签名。

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.

当您有INSTALL_FAILED_UPDATE_INCOMPATIBLE错误的修复是先卸载你的应用程序,然后你不应该有更多的问题,当启动 cordova run 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

这篇关于Cordova:将android升级到5.1.1 Nexus 5后无法安装apk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆