Android_Install 版本降级失败
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24547924/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Android_Install failed version downgrade
提问by user3503072
I'm going to update my apk on GooglePlayStore and I know that i have to upgrade the version code and name in manifest file however, it made install_failed.
我将在GooglePlayStore上更新我的 apk ,我知道我必须升级清单文件中的版本代码和名称,但是它导致 install_failed。
Installation error: INSTALL_FAILED_VERSION_DOWNGRADE
Please check logcat output for more details. Launch canceled!
请检查 logcat 输出以获取更多详细信息。发射取消!
I modified the version code and name like this: android:versionCode="2" android:versionName="1.0.5"
我像这样修改了版本代码和名称:android:versionCode="2" android:versionName="1.0.5"
Did i make it wrong?
我做错了吗?
回答by Martin
Just uninstall the application on your device first and then install the fresh one.
只需先卸载设备上的应用程序,然后安装新的应用程序即可。
回答by kemuri
When you are installing via adb
you can pass -d
to allow version downgrade
当您通过安装时,adb
您可以通过-d
以允许版本降级
adb install -d -r your.apk
-r
will also replace the existing app
-r
还将替换现有的应用程序
回答by Satyapira Pradhan
Installation error: INSTALL_FAILED_VERSION_DOWNGRADE Please check logcat output for more details. Launch canceled!
I solved it by using the command prompt,navigating to project folder >adb uninstall package (you can get the package from Manifest.xml file).
我通过使用命令提示符解决了它,导航到项目文件夹 >adb 卸载包(您可以从 Manifest.xml 文件中获取该包)。
In my case : D:\projectFolder\AndriodApp>adb uninstall com.example.app
就我而言:D:\projectFolder\AndriodApp>adb uninstall com.example.app
Again launch the App in emulator or mobile.
再次在模拟器或移动设备中启动应用程序。
回答by Karl Lu
just use this:
只需使用这个:
$ adb -e uninstall your.application.package.name
$ adb -e uninstall your.application.package.name
回答by keyboardsurfer
Apparently the versionCode
of your currently installed version of the application is greater than 2, thus resulting in a failed installation on the device.
显然versionCode
,您当前安装的应用程序版本大于 2,从而导致在设备上安装失败。
回答by Yusuf
This happen when your installed apk version less than version by which you are trying to build apk. For example you just upgrade your version and try to build apk with it but you already a installed apk in your device which was build by the previous one.
当您安装的 apk 版本低于您尝试构建 apk 的版本时,就会发生这种情况。例如,您只是升级您的版本并尝试用它构建 apk,但您的设备中已经安装了一个由前一个构建的 apk。
In this case you must uninstall the previous apk and build a new one with the exiting version.
在这种情况下,您必须卸载以前的 apk 并使用现有版本构建一个新的 apk。
回答by Jose Flores
I just disabled it first in setting>apps>allapps>app and I was able to install using regular command: adb -r name.apk
我只是在设置>应用程序>所有应用程序>应用程序中首先禁用它,我能够使用常规命令进行安装:adb -r name.apk
回答by Ajay Takur
First thing you need to do is check versionCode and versionName for palystore apk and then increment number by one for both versionCode and versionName.
您需要做的第一件事是检查 palystore apk 的 versionCode 和 versionName,然后将 versionCode 和 versionName 的数字加一。
for instance:in playstore versionCode="42"
and versionName="1.4.2"
then change it versionCode="43"
and versionName="1.4.3"
in your latest code
例如:在Play商店中 versionCode="42"
和versionName="1.4.2"
,然后改变它versionCode="43"
,并versionName="1.4.3"
在最新的代码
回答by Atul Panda
回答by Krishna Vedula
In my case, I had to remove and uninstall the version on the device and then running the project. It reinstalled the version in the IDE and it worked like a charm.
就我而言,我必须删除并卸载设备上的版本,然后运行该项目。它在 IDE 中重新安装了该版本,并且效果很好。