"File is corrupted" error when trying to install .apk file in Android

Hello all, I've looked around the forums for an answer to this problem but all I've seen are references to old bugs which should've been fixed by now. I've finished preparing a test version of an android app using Xamarin and I'd like to test it on my phone. The application runs just fine when I connect my phone to the computer and I debug with it, but when distributing the APK and installing it the error mentioned in the title pops up.

These are the fixes I've tried to get it working:

Unchecking Shared Runtime/Fast Deployment
Clean/Rebuild/remaking the archived .apk file
Enable and disabling linking, proguard, multidex
Making and remaking Ad-hoc identities

Nothing's worked so far. I'm leaning towards it being a signing issue from what I've read since the application runs perfectly fine in debugging mode.

Best Answer

  • ProgramOtterProgramOtter ✭✭
    Accepted Answer

    @YorkGo said:
    Run adb shell pm uninstall com.company.appname, sometimes App manager on Android doesn't fully uninstall the app.

    If the issue still exists, please share the diagnostic build output.

    Thank you, I managed to solve it already by reinstalling Visual Studio 2017 and all its related components.

Answers

  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭

    have you tried to remove the app previously installed on the device and restart the device?

  • ProgramOtterProgramOtter Member ✭✭

    @AlessandroCaliaro said:
    have you tried to remove the app previously installed on the device and restart the device?

    Yes to both those things! I've also tried the app on three different Android phones and it worked in none of them.

  • YorkGoYorkGo CNMember, Xamarin Team Xamurai

    Run adb shell pm uninstall com.company.appname, sometimes App manager on Android doesn't fully uninstall the app.

    If the issue still exists, please share the diagnostic build output.

  • ProgramOtterProgramOtter Member ✭✭
    Accepted Answer

    @YorkGo said:
    Run adb shell pm uninstall com.company.appname, sometimes App manager on Android doesn't fully uninstall the app.

    If the issue still exists, please share the diagnostic build output.

    Thank you, I managed to solve it already by reinstalling Visual Studio 2017 and all its related components.

Sign In or Register to comment.