INSTALL_FAILED_UPDATE_INCOMPATIBLE

I get this error each time I try to debug my latest version on my LG phone. My app used to work on the LG and it is running fine on a Google Nexus 7.

Below is the error from Visual Studio:

Xamarin.AndroidTools.AndroidDeploymentException: 
InternalError ---> Mono.AndroidTools.InstallFailedException: Failure
[INSTALL_FAILED_UPDATE_INCOMPATIBLE]
at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass2a.<InstallPackage>b__29(Task`1 t)
at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
at Xamarin.AndroidTools.AndroidDeploySession.RunLogged(CancellationToken token)
at Xamarin.AndroidTools.AndroidDeploySession.Start(CancellationToken token)

Any idea of the cause or how get app to install?

«1

Posts

  • PaulKeefePaulKeefe USMember ✭✭

    That would make sense except I don't have any version installed on the device. I re-checked app manager and the app is not installed.

  • NezzNezz HUMember

    Happened to me too when switching dev machines. Softlion's fix worked.

  • DanVanderboomDanVanderboom USUniversity ✭✭

    @softlion You're a life saver, thank you!

  • VH5150VH5150 GBMember ✭✭

    I had an identical issue here today, after some head scratching I traced it to the fact I'd intentionally enabled 'Preserve application data/cache on device between deploys' under Tools -> Options -> Xamarin -> Android Settings: Emulator Device/Debugging. At next next deploy the app appeared to be uninstalled but when checking in Task Manager it showed it was still installed with a size of ~60Kb. Uninstalling manually then solved the issue and I was able to deploy successfully and preserve my settings too.

    Cheers

  • AshayMoreyAshayMorey USMember

    @Tom Opgenorth , you rock . It works :smile:

  • PhilOxenbergPhilOxenberg USMember ✭✭

    The solution given by Benjamin worked for me. Thank you.

    Benjamin Mayrargue
    October 2014
    Delete your existing app. It will not be listed under applications with the display name nor have a launch icon. You will find it under Applications with its package name instead. It always is there. Uninstall the package and deploy your new version normally.

    This is a very old "limitation".

  • Vikram_BVikram_B USMember ✭✭

    Just follow any of the solution that will work
    1.give Build to project
    2.Clean Project
    3.Check your phone setting-->App-->got to All categories-->Find out the App that you installed
    uninstall for all users(In new phones like Lollipop version) or else normal uninstall

    4.Still one kind of file like com.yourporoject.Appname will be there uninstall that one tooo

    run again

  • AngelR0909AngelR0909 FRMember, University

    @softlion said:
    Delete your existing app. It will not be listed under applications with the display name nor have a launch icon. You will find it under Applications with its package name instead. It always is there. Uninstall the package and deploy your new version normally.

    This is a very old "limitation".

    Thanks @softlion

  • praveenaHMpraveenaHM USMember

    Hai Jakub Holovsky,

    Thanks for this solution its now work on my simulator device from the xamarin studio.

    Thank you...
    Praveen

  • JasonRaiJasonRai USMember ✭✭

    Android Studio and Eclipse prompt to remove and replace the app if the signature doesn't match. XS and VS need to do the same.

  • ChrisChanChrisChan MYMember

    it never happen to me on Xamarin Studio, after switch to Visual Studio. it happen all the time. (paid more moeney to get more trouble......)

  • MichelangeloFrancoMichelangeloFranco ITUniversity ✭✭

    if happen on simulator you can factory reset the image.

  • JohnBeansJohnBeans USMember ✭✭

    You'll also get this error if you don't have your keystore set correctly in Android Package Signing.

  • AaronKianderAaronKiander USMember

    @softlion said:
    Delete your existing app. It will not be listed under applications with the display name nor have a launch icon. You will find it under Applications with its package name instead. It always is there. Uninstall the package and deploy your new version normally.

    This is a very old "limitation".

    THANK YOU, @softlion - that was extremely helpful.

  • TANCTTANCT USMember

    @MehulTheXammer Thank you for your solution. It works for me.

  • WVDRWVDR ZAMember

    First off I like to thank all for the hints and tips thus far, the issue has creeped in for me when on VS 2015 update 3; I it took me a couple of days to solve. So hopefully this post,will help others:

    I initially installed one of these components to test/use in my solution via nuget:
    https://www.nuget.org/packages/Xamarin.Android.Support.v4/
    https://www.nuget.org/packages/Xamarin.Android.Support.Design/
    https://www.nuget.org/packages/Xamarin.Android.Support.v7.AppCompat/
    https://www.nuget.org/packages/Xamarin.Android.Support.v7.CardView/
    https://www.nuget.org/packages/Xamarin.Android.Support.v7.MediaRouter/

    However if you look closely at the release at the bottom of the page its latest release = 23.4.0
    Then when installing Xamarin.Froms https://www.nuget.org/packages/Xamarin.Forms/ there are lots of failures because again looking at the bottom of the page:

    Dependencies
    MonoAndroid 1.0
    Xamarin.Android.Support.v4 (= 23.3.0)
    Xamarin.Android.Support.Design (= 23.3.0)
    Xamarin.Android.Support.v7.AppCompat (= 23.3.0)
    Xamarin.Android.Support.v7.CardView (= 23.3.0)
    Xamarin.Android.Support.v7.MediaRouter (= 23.3.0)

    So it needs to have specifically version 23.3.0 and not the latest version 23.4.0, so uninstall each of these separate components manually and then only install Xamarin.Froms targeting release 23.3.0. Unfortunately somewhere along the line I also undated my SDK( to 24 thinking it needed a later version to help) and when having VS and SDK manager doing updates (via nuget or other) the android sdk folder is cleared: https://forums.xamarin.com/discussion/43688/android-sdk-manager-and-avd-will-not-open-neither-will-my-xaml-layouts this solution solves that problem.

    Then I started the SDK manager and noticed that I now have the latest SDK (25.1) which is fine but then this issue started popping up https://forums.xamarin.com/discussion/20816/error-building-project-with-google-play-services and my solution does not build. However this in itself was a red herring. (I actually ended up doing reinstall of VS and then the SDK manager, which does not solve anything)

    What worked for me was manually uninstalling the app in the applications (as all the helpful people pointed out), and then also firing up adb and then running uninstall <Application/Package> returned a successful response. Running it again actually then only gave the failure response I was hoping for, to know it was truly off the device. So somewhere in the device(I tested on both virtual and physical devices using kit kat, lollipop and marshmallow ) there was still a ghost copy of the application looming.

    NB: I also tried doing a factory reset, but did not remove the application/Allow the application to redeploy to the device... it seems really only adb removes the application completely.

    In summary:
    Check Xamarin.Froms release version before installing/reinstalling.
    I would also check/confirm if the adb uninstall process returns a success or failure response, to make sure the original app is really gone; before looking elsewhere for a potential problem.

    Regards,
    W

  • AmjadAzizi10AmjadAzizi10 USMember ✭✭

    Ok Guys

    This is a very STUPID error and time wasting!!

    I tried all most everything to delete it from my LG G3. But this helped:

    Run the following command from the Android console:
    "adb uninstall com.theircompany.packagename"

    This should allow you to uninstall the app manually from the device without having to do a factory reset.

  • Martinelli00Martinelli00 USMember
    edited July 2016

    Great job, thanks

  • adb uninstall com.theircompany.packagename

    worked for me too - Thanks.

  • MichelangeloFrancoMichelangeloFranco ITUniversity ✭✭

    The solution is to reinstall APK, then in Setings --> Application uninstall it.

  • MikeScott8MikeScott8 USUniversity

    @AmjadAzizi10 said:
    Ok Guys

    This is a very STUPID error and time wasting!!

    I tried all most everything to delete it from my LG G3. But this helped:

    Run the following command from the Android console:
    "adb uninstall com.theircompany.packagename"

    This should allow you to uninstall the app manually from the device without having to do a factory reset.

    I agree, this finally worked for me!

  • SuatKorkmazSuatKorkmaz USMember ✭✭✭

    @PaulKeefe said:
    The problem seemed to be that a "ghost" copy of my app still existed on the device (probably just a file or two), so there was no app icon and it was not listed as an installed app.

    To fix it I reinstalled the production app from the external SD and then uninstalled it (using AppInstaller which is great if you haven't tried it).

    Now the debugger is able to install the debug version without incident.

    You are my hero.

  • JohnnyJaxsJohnnyJaxs USMember ✭✭

    In my case even when i had uninstalled the app, the error was still appeared.

    Probably something wrong happened during the last deployment (in the current application version uninstall pahse) and the app did not uninstalled properly.

    By going to Settings->Application Manager, select you up and just uninstall it. Then i was able to deploy again.

    And even in case that error still persist then browse your phone memory from My Computer go to .Android->.data and if you may find a "myPackage" folder, then delete it.
    Remember before delete any directory make a backup.

    Good luck

  • shanshanshanshan SEMember

    @TomOpgenorth said:
    I'll see this type of error when I'm developing on my device. Then I go to install a release version via TestFlight or adb and this message happens. A lot of the time this happens because your debug version is signed with a different key than the release version. Android detects this and gets angry.

    You get rid of it by uninstalling the older version of your application. YOu might have to go into Settings...Apps, and scroll down to your application and then delete it from there. Once you've deleted your application it should install normally.

    Then when you

    This answer saved my day :)

  • merbsmerbs PHMember ✭✭

    @MikeScott8 said:

    @AmjadAzizi10 said:
    Ok Guys

    This is a very STUPID error and time wasting!!

    I tried all most everything to delete it from my LG G3. But this helped:

    Run the following command from the Android console:
    "adb uninstall com.theircompany.packagename"

    This should allow you to uninstall the app manually from the device without having to do a factory reset.

    what if it says DELETE_FAIL_INTERNAL_ERROR

  • lawred2lawred2 USMember

    @merbs said:

    @MikeScott8 said:

    @AmjadAzizi10 said:
    Ok Guys

    This is a very STUPID error and time wasting!!

    I tried all most everything to delete it from my LG G3. But this helped:

    Run the following command from the Android console:
    "adb uninstall com.theircompany.packagename"

    This should allow you to uninstall the app manually from the device without having to do a factory reset.

    what if it says DELETE_FAIL_INTERNAL_ERROR

    This is what I'm getting right now

    This is my first few days using Vs with Xamarin - it's been non stop issues and problems

    Load of cobblers

  • NateVargheseNateVarghese USUniversity ✭✭

    This is an android issue. You have to make sure the app is complete uninstalled from the android device.

    on the device If you go settings -> applications -> find yours and delete it then try again it should work.

    I think it has to do with a signed copy being installed (or not fully uninstalled) then trying to installed a debug version over

  • gabooboogabooboo USMember ✭✭

    @TomOpgenorth said:
    I'll see this type of error when I'm developing on my device. Then I go to install a release version via TestFlight or adb and this message happens. A lot of the time this happens because your debug version is signed with a different key than the release version. Android detects this and gets angry.

    You get rid of it by uninstalling the older version of your application. YOu might have to go into Settings...Apps, and scroll down to your application and then delete it from there. Once you've deleted your application it should install normally.

    Then when you

    Really thanks @TomOpgenorth you solved my problem: I deleted "the rest" of the app in Settings...Apps. I said "the rest" because I already unistalled my app via Unistall procedure (drag&drop) but something remained there. Thanks.

  • TiagoFreitasLealTiagoFreitasLeal PTMember
    edited October 2016

    @MehulTheXammer said:
    An alternate solution is to run the command i.e. adb uninstall com.theircompany.packagename from android command prompt located at below path:
    "AppData\Local\Android\android-sdk\build-tools"

    This worked for me except:
    1) I found adb.exe on C:\Users\USER_NAME\AppData\Local\Xamarin\Universal\AndroidSDK\platform-tools
    2) After that I restarted my laptop and my tablet (just to make sure).

  • SteveDolanSteveDolan USMember

    I had a HD failure so had to go to set up a new pc, with a new install of VS2015 and now I'm struggling with this. I've uninstalled the app via Application manager, checked that there are no directories in Android/data, tried adb uninstall (which failed to delete anything) rebooted and I still can't get my app to deploy.

    I'm trying to get the last updates tested before go live (so everything is currently in debug mode) so I'm up against the clock.

    Anyone have any ideas?

  • SteveDolanSteveDolan USMember

    This is occurring on all 5 Samsung Galaxy tab devices. I've spent the lat 2 hrs trying to get it to work, and finally decided to do a factory reset on one of the devices. That did work, but it's not a viable solution when I deploy these tablets into production. I'd appreciate it if someone has any ideas, I'm going to need a resolution before I go live otherwise it'll make the app un maintainable.

    Thanks
    Steve

  • try force removing it using adb.
    adb uninstall {PACKAGE NAME}

  • AlvinYuanAlvinYuan CNMember

    按照这个方法解决了,多谢!

  • @softlion Man, you saved my life. Thanks a lot :smiley:

«1
Sign In or Register to comment.