1
votes

Iam making a android project in Xamarin. Iam referencing a Azure mobile services NuGet package to it.

Iam building the app using http://azure.microsoft.com/en-us/documentation/articles/partner-xamarin-mobile-services-android-get-started-users/.

But when I build the project I get errors like:-

C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(3,3): Error: Duplicate managed type found! Mappings between managed types and Java types must be unique. First Type: 'Xamarin.Auth.AndroidAccountStore/SecretAccount, Microsoft.WindowsAzure.Mobile.Ext, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'; Second Type: 'Xamarin.Auth.AndroidAccountStore/SecretAccount, Xamarin.Auth.Android, Version=1.2.2.0, Culture=neutral, PublicKeyToken=null' (AppName)

What could be going wrong?

1

1 Answers

0
votes

The problem is that you use Xamarin.Auth and MobileServices, and since MobileServices uses internally Xamarin.Auth you have a conflict. More details are here click. Also there is a similar post here click I have manage to find a workaround. Create a Portable Class Library in which you add the nugget version of mobile services. In this way you can make a wrapper over the existing mobile services from the pcl. This clearly works and it the best solution till the bug is fixed. If you have any questions please feel free to ask.