development

Android 에뮬레이터 : 설치 오류 : INSTALL_FAILED_VERSION_DOWNGRADE

big-blog 2020. 6. 25. 07:31
반응형

Android 에뮬레이터 : 설치 오류 : INSTALL_FAILED_VERSION_DOWNGRADE


현재 작은 Android 응용 프로그램을 컴파일하고 테스트하려고합니다.

Eclipse를 사용하고 있으며 SDK 4.2 (Api Level 17)가 설치되어 있습니다. 내가 설정했습니다

<uses-sdk android:targetSdkVersion="17" android:minSdkVersion="8" />

다른 값 (예 : 17/17)도 시도했지만.

GoogleAPI 함수를 사용하지 않으며 API 레벨 8에서 사용할 수없는 함수를 사용하지 않습니다. 또는 적어도 이와 관련하여 컴파일 오류나 경고가 표시되지 않습니다.

프로젝트를 컴파일하고 Android 2.2.1을 실행하는 실제 장치에서 실행하면 응용 프로그램이 제대로 실행됩니다. 그러나 Android 4.2, Api Level 17을 사용하여 에뮬레이터 (Android Virtual Device)에서 응용 프로그램을 실행하려고하면 다음 오류가 발생합니다.

[2012-12-10 21:10:29 - SoftKeyboard] Installation error: INSTALL_FAILED_VERSION_DOWNGRADE
[2012-12-10 21:10:29 - SoftKeyboard] Please check logcat output for more details.
[2012-12-10 21:10:29 - SoftKeyboard] Launch canceled!

그러나 Logcat은 비어 있습니다. 나는 실마리가 없다.이 오류의 의미조차도 ...


그것은 이미 에뮬레이터에 설치된 앱과 동일한 packageName으로 앱을 설치하려고하지만 설치하려는 버전이 더 낮은 versionCode (버전 번호의 정수 값)를 가지고 있음을 의미합니다.

버전 번호가 현재 작업중인 사본보다 높은 별도의 코드 사본에서 설치했을 수 있습니다. 두 경우 모두

  • 현재 설치된 사본을 제거

  • 또는 휴대 전화의 설정> 응용 프로그램 관리자를 열어 설치된 앱의 버전 번호를 확인 <manifest android:versionCode하고 AndroidManifest에서 더 높게 설정하십시오.

  • 또는 https://stackoverflow.com/a/13772620/632951


-dadb 설치에 플래그를 추가 할 수도 있습니다 . 이 오류는 무시해야합니다.

adb install -r -d abc.apk

먼저 에뮬레이터에서 응용 프로그램을 제거하십시오.

adb -e uninstall your.application.package.name

그런 다음 응용 프로그램을 다시 설치하십시오.


XML 코드를 사용하여 버전 코드를 설정했기 때문에 프로젝트에서 발생했습니다.

AndroidManifest.xml:
android:versionCode="@integer/app_version_code"

app.xml:
<integer name="app_version_code">64</integer>

이는 이전 버전에서 문제가되지 않았다 adb의로, 그러나, platform-tools이 더 이상 적절한 정수로 해석되고있다 R16. adb -r매니페스트에서 리터럴을 사용 하여 강제로 다시 설치 하거나 문제를 완전히 피할 수 있습니다 .

android:versionCode="64"

Play 스토어에서 서명 된 릴리스 APK 위에 디버그 / 서명되지 않은 APK를 설치하려고 할 때 발생할 수 있습니다.

H:\>adb install -r "Signed.apk"
2909 KB/s (220439 bytes in 0.074s)
        pkg: /data/local/tmp/Signed.apk
Success

H:\>adb install -r "AppName.apk"
2753 KB/s (219954 bytes in 0.078s)
        pkg: /data/local/tmp/AppName.apk
Failure [INSTALL_FAILED_VERSION_DOWNGRADE]

이에 대한 해결책은하는 것입니다 제거 하고 다시 설치하거나 IDE에서 실행 다시.


INSTALL_FAILED_VERSION_DOWNGRADE

모든 Android 앱에는 패키지 이름이 있습니다. 패키지 이름은 장치에서 앱을 고유하게 식별합니다. 장치에 이미 설치된과 동일한 packageName 인 경우이 오류가 표시됩니다.

  1. 먼저 장치 에서 응용 프로그램을 제거한 다음 새 응용 프로그램 을 설치할 수 있습니다 .
  2. 새 버전이 출시 될 때마다 숫자를 하나씩 늘릴 수 있습니다.

마시멜로에서이 오류가 발생했습니다.

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

내가 찾은 솔루션을 찾고 여기에 왔습니다. 앱을 삭제했지만 여전히 Nexus 6에서이 문제가 발생합니다.

Settings > Apps > [My app name] have to removed for all user. 

... \ android-22 \ android \ content \ pm \ PackageManager.java의 SDK src 코드에 따르면

/**
 * Installation return code: this is passed to the {@link IPackageInstallObserver} by
 * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
 * the new package has an older version code than the currently installed package.
 * @hide
 */
public static final int INSTALL_FAILED_VERSION_DOWNGRADE = -25;

새 패키지에 현재 설치된 패키지보다 이전 버전의 코드가있는 경우


I was having same problem. I was getting error when i tried to run in my android device not emulator.

sudo ionic run android 

I am able to fix this by running

adb uninstall com.mypackage.name

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


this happened to me when I imported an Android Studio App into eclipse.

I figured out the andoridmanifest.xml file needs to be slightly modified when importing from android studio project. I created a new test project, and copied over the headings to make it match. voila, issue solved.


This error appears in my android project with multiple kind of gfx files. At the end no change in the manifest file was accepted.

Because my lack of knowledge about the android devices I forget that my test device has a second User. This User also has an installed version of my app so I also have to delete the app for this user account and it works.


the thing that kept on killing me was that i didn't know that this app was installed for my guest account (although I had uninstalled it for the other accounts..)

so i searched for the app in the app manager, and simply clicked on uninstall for all users

enter image description here


Just uninstall the previous Apk and install the updated APK

참고URL : https://stackoverflow.com/questions/13808599/android-emulator-installation-error-install-failed-version-downgrade

반응형