无法通过 android studio 在 Lollipop 中生成的 apk 文件升级旧应用程序 [英] Cannot upgrade old application by android studio generated apk file in Lollipop

查看:28
本文介绍了无法通过 android studio 在 Lollipop 中生成的 apk 文件升级旧应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在手机中从 google Play 商店安装了我的应用程序的旧版本(版本 1).现在我想将此应用程序更新到新版本(版本 2),因此,我使用 android studio 生成了新的 apk 文件,并将此生成的 apk 上传到谷歌驱动器.然后从我的多个设备(Android 5.1.1 和 Android 4.2.2)下载并安装.

I was installed old version(version 1) of my application from google play store in my phones. Now I would like to update this app to new version(version 2), so, I generated new apk file by using android studio and I upload this generated apk to google drive. Then download and install from my several devices(Android 5.1.1, and Android 4.2.2).

在 android 4.2.2 中,我可以安装下载的 apk 并且我的应用程序已成功升级到版本 2.

In android 4.2.2, I can install the downloaded apk and my application was upgraded to version 2 successfully.

在 Android 5.1.1 中,我可以单击安装按钮,然后显示未安装应用程序"错误消息并且应用程序未升级到新版本(版本 2).

In Android 5.1.1, I can click on install button, after that show the "App not installed" error message and the application was not upgraded to new version(version 2).

你能给我一些建议吗?

Android 5.1.1 设备见附件图片.

Please see the attachment picture of android 5.1.1 device.

推荐答案

我认为是 bug.升级到新版本时发生在我身上.当 Android 操作系统中有 2 个用户时会出现问题(即设置>用户.可能在您的情况下,访客用户必须存在).因此,当之前安装了应用程序时,必须为主要用户和来宾用户安装它.因此,当 Android 操作系统尝试卸载应用程序进行升级时,它只会卸载主用户的应用程序,而不是访客用户的应用程序.因此,该应用程序仍然存在于操作系统中,但不适用于阻止安装新应用程序的主要用户.至少这是我认为的.(我使用的是 Moto G)

I think it is bug. It happened to me once while upgrading to a new version. The problem occurs when there are 2 users in Android OS(i.e. Settings>Users. Probably in your case, guest user must be present). So when app was previously installed, it must be installed for both primary and guest user. So when Android OS tries to uninstall the app to upgrade, it only uninstalls app for primary user and not for guest user. So the app is still present in the OS but not for primary user preventing installation of the new app. At least this is what I think it is.(I am using a Moto G)

但是我从 Playstore 升级时从未遇到过这个错误.只有在尝试通过从外部源安装 apk 来升级应用程序时才会发生这种情况.我希望它有帮助...

But I have never encountered this bug when upgrading from playstore. It only happened when trying to upgrade app by installing apk from external source. I hope it helps...

这篇关于无法通过 android studio 在 Lollipop 中生成的 apk 文件升级旧应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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