Hi all,
I have developed an app in Xamarin.Android and now I want to package it for distribution. I am using this guideline as my reference but I am stuck at the very first step!
As soon as I write these lines
#if RELEASE
[assembly: Application(Debuggable=false)]
#else
[assembly: Application(Debuggable=true)]
#endif
in the AssemblyInfo.cs I get the following error when I build the app:
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(3,3): Error MSB4018: The "GenerateJavaStubs" task failed unexpectedly.
System.InvalidOperationException: Application cannot have both a type with an [Application] attribute and an [assembly:Application] attribute.
at Xamarin.Android.Tasks.ManifestDocument.CreateApplicationElement(XElement manifest, List`1 subclasses, List`1 selectedWhitelistAssemblies)
at Xamarin.Android.Tasks.ManifestDocument.Merge(List`1 subclasses, List`1 selectedWhitelistAssemblies, Boolean embed, Boolean replaceSplashScreen, IDictionary`2 splashScreenClasses)
at Xamarin.Android.Tasks.GenerateJavaStubs.Run()
at Xamarin.Android.Tasks.GenerateJavaStubs.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() (MSB4018) (LoyaltyMerchant)
Any help will be highly appreciated.
Thanks.