Hello everyone
Since some days, the Android packaged application (signed) produced by Xamarin through Visual Studio is corrupted, and I can't install it on my device, I have this following message: The package appears to be corrupted.
Looking on the previous working builds that I made, I noticed than the META-INF folder is missing into the corrupted APK. I did some searches on the web, but didn't figure out why it's not created anymore.
Do you have any idea?
Thanks in advance
Posts
I have exactly the same problem, I created an APK package and when I try to install it on an galaxy S7, the error 'The package appears to be corrupted.' appears. Have you managed to solve the issue? I my case this is an update of an android project that used to deploy without issues.
Thanks,
Bert-Jan
Yep I managed to find the solution myself, I just forgot to post it here
If the META-INF folder is missing, it means that your APK is not signed. Make sure to use the file with the filename that ends by -Signed.apk.
Actually, I solved my issue, I hadn't signed the package (go to tools, archive manager, distribute..)
It actually needs to be signed & generation as a Release Build is necessary, by default it's on Debugging Build. Using -signed.apk filename etc is not the solution.
Future users can refer to this video on generating & signing .apk file that's small in size & can be distributed among users & on playstore:
Hi, I did all steps in the video and continue having the same issue "The package appears to be corrupted.". I'm using VS2015 Enterprise. I also tried to use the apk file which is in "signed-apks" (after Ad Hoc Distribution) folder to but it also didn't work.
Do someone have an idea how I can make it work ?
Thanks
I still have the problem even though I signed the apk file.
I am also experiencing the same problem, I can run it in release mode and deploy on my device and it will work. If i make a build, sign the apk file and download it to phone it will say file has been corrupted or damaged. I have no idea why.
Build your project in Release mode. Right click in project icon and click on Deploy. Signed apk will be generated under ../bin/Release/packagename-Signed.apk.
Hope, it helps you
That actually worked. Thanks a lot, really nice to come back after the weekend to a solution that works. I still have no idea why i would work to generate the signed file through release mode instead of building it and then signing it. Again thanks! Have a nice day.
Do you know what it signs the .apk file with? Is it something standard for testing, does it take one of my registered profiles for signing? If it's a standard, do you then know if that is customizable
@MizanurRahman.0834
I have spend three days and I still can't build a release for Android that works. Using VS2017 Pro.
I was also getting this corrupted message. Now as far as this META-INF folder, I have no idea where this is or what creates it. This folder does not appear in my distribution. Perhaps this is an older version that created this. I'm using all the latest tools and once you sign your archive, you have a "Open Folder" button that should open a folder with a .apk file (unsigned). In this same directory you should see a "signed-apks" folder. In this folder is the signed .apk file that you want to distribute.
When you initially create add or import the signed certificate, it should prompt you for a location to save the signed .apk. This is where the "Open Distribution" link should bring you to.
Can I generate a signed version of .apk using Jenkins Automated Build?
Hi, you can use this link to create and publish the apk.
I have a same problem. I made a new C# Blank App Android project as App1, builded in relase mode and distributed it with/without signed, adhoc, the result are same: "The package appears to be corrupt" message on the phone screen. I have fully updated VS 2017, Xamarin. :-(
fml, I know better and was doing the same thing. I forgot to press Distribute, AdHoc and set the signing key.
The solution provided by @MizanurRahman.0834 worked for me. Thanks.
I have the same problem. Trued all solutions but still no luck. The error is:
You uploaded an APK with an invalid signature (learn more about signing). Error from apksigner: ERROR: JAR_SIG_NO_MANIFEST: Missing META-INF/MANIFEST.MF