Publish Android App option in disabled in Xamarin

2019-02-17 18:40发布

问题:

When trying to publish my android application, the option: Tools->Android->Publish Android App is disabled in Visual studio 2015, so I am unable to sign my application and publish it. What could be the reason?

回答1:

go to properties of your project and uncheck the "Use Shared Runtime" then ctrl+shift +B



回答2:

3 probable causes:

1- Your Solution configuration is on Debug, and you must select Release to deploy.

2- Uncheck Use Shared Runtime checkbox. When this is selected and you're in release mode, and the export option won't be available at all.

3- You deployed a previuos version and not changed yet the Android Manifiest file. To change choose your Droid project, open properties and check into Android Manifiest tab:

Version Number and Version name fields.

Are same values of your previous deploy?

Try changing these values.

Seems like Xamarin will disable this option until you change it to new values.



回答3:

Another possible reason, from Xamarin Forum (this fixed the issue for me). In Android-SDK>Tools I had a couple of folders only.

SDK>Tools folder will be empty. Go to SDK > Temp folder. There will be a wrar named tools_. Copy this rar somewhere else and extract it. Extracted folder will have the "Tools" folder. Replace this Tools folder with SDK>Tools folder and Archive/SDK Manager etc everything will be back.

https://forums.xamarin.com/discussion/85853/archive-option-is-disabled-in-visual-studio-2015

Then restart Visual Studio.