Application shortcut disappears after every update, what happened to my manifest?

I have no idea why this is happening, I've tried everything. Every time I update the app, the previous shortcut that was on the home screen disappears.

Here is my complete application manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.SpaceMonkey.Boats" android:versionCode="161" android:versionName="1.6.1">
    <uses-sdk android:minSdkVersion="15" android:targetSdkVersion="21" />
    <application android:label="Boats" android:icon="@drawable/playstore"></application>
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</manifest>

      

And my main activity:

[Activity (Label = "Boats", Icon = "@drawable/playstore", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
    public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsApplicationActivity

      

The only thing I change is when I update the versionCode and versionName in the manifest, absolutely nothing changes.

What am I doing wrong here?

EDIT: I'm starting to think this is a problem with Xamarin generating a new app manifest in the background, I'm not sure how to test this.

EDIT: I just tested an Android (Xamarin) app that doesn't use Xamarin.Forms and didn't have this issue. My suspicions where confirmed that it has something to do with Xamarin.Forms.

+3


source to share


2 answers


The problem was Xamarin Studio. I basically recreated the solution and copied everything, then the problem went away ...



I don't know what's going on, but he decided now.

+1


source


In my case, the problem was caused by a change AssemblyVersion

in AssemblyInfo.cs

my android app project.

This issue is caused by Xamarin.Android 5.0 and later (not Xamarin.Forms). As described in the release documentation here :

With the 5.0 release, the default package names for Android Callable Wrappers will be based on MD5SUM with the assembly qualification of the name of the exported type.



AssemblyVersion

is part of the assembly name , any version change generated a new MD5 hash creating a new default package name. (More on the qualified team listed here )

The app shortcut uses the default package name to launch your app, so every update will make a shortcut shortcut and the system will remove it.

Fix: Do not change AssemblyVersion

in the Android project or anything else that changes the name corresponding to the assembly.

+2


source







All Articles