Android Emulator: Installation error: INSTALL_FAILED_VERSION_DOWNGRADE

后端 未结 15 1486
旧巷少年郎
旧巷少年郎 2020-12-12 11:16

I am currently trying to compile and test a small Android Application.

I am using Eclipse, and have SDK 4.2 (Api Level 17) installed. I\'ve set

<         


        
相关标签:
15条回答
  • 2020-12-12 11:20

    It means you're trying to install an app with the same packageName as an app that's already installed on the emulator, but the one you're trying to install has a lower versionCode (integer value for your version number).

    You might have installed from a separate copy of the code where the version number was higher than the copy you're working with right now. In either case, either:

    • uninstall the currently installed copy

    • or open up your phone's Settings > Application Manager to determine the version number for the installed app, and increment your <manifest android:versionCode to be higher in the AndroidManifest.

    • or https://stackoverflow.com/a/13772620/632951

    0 讨论(0)
  • 2020-12-12 11:21

    In Marshmallow, I got this error,

    Installation error: INSTALL_FAILED_PERMISSION_MODEL_DOWNGRADE
    Please check logcat output for more details.
    Launch canceled!
    

    Looking for solution I searched and came here. I deleted the app but still have this problem in Nexus 6. Later found that in,

    Settings > Apps > [My app name] have to removed for all user. 
    
    0 讨论(0)
  • 2020-12-12 11:24

    First uninstall your application from the emulator:

    adb -e uninstall your.application.package.name
    

    Then try to install the application again.

    0 讨论(0)
  • 2020-12-12 11:24

    you can try this: adb install -r -d -f your_Apk_path

    0 讨论(0)
  • 2020-12-12 11:26

    This was happening in my project because I was using an XML resource to set the version code.

    AndroidManifest.xml:
    android:versionCode="@integer/app_version_code"
    
    app.xml:
    <integer name="app_version_code">64</integer>
    

    This wasn't a problem in prior versions of adb, however, as of platform-tools r16 this is no longer being resolved to the proper integer. You can either force the re-install using adb -r or avoid the issue entirely by using a literal in the manifest:

    android:versionCode="64"
    
    0 讨论(0)
  • 2020-12-12 11:27

    INSTALL_FAILED_VERSION_DOWNGRADE

    All Android apps have a package name. The package name uniquely identifies the app on the device. If same packageName as app that's already installed on the device then this error Showing .

    1. You can uninstall the application from your device first and then install the fresh one .
    2. You could simply increase the number by one each time a new version is released.
    0 讨论(0)
提交回复
热议问题