after installing plugin.media library getting this error
Severity Code Description Project File Line Suppression State Error The "GenerateJavaStubs" task failed unexpectedly. System.InvalidOperationException: There can be only one type with an [Application] attribute; found: ,at Xamarin.Android.Tasks.ManifestDocument.CreateApplicationElement(XElement manifest, String applicationClass, List`1 subclasses, List`1 selectedWhitelistAssemblies)at Xamarin.Android.Tasks.ManifestDocument.Merge(List`1 subclasses, List`1 selectedWhitelistAssemblies, String applicationClass, Boolean embed, String bundledWearApplicationName, IEnumerable`1 mergedManifestDocuments)at Xamarin.Android.Tasks.GenerateJavaStubs.Run(DirectoryAssemblyResolver res)at Xamarin.Android.Tasks.GenerateJavaStubs.Execute()at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() XamarinForms.QbChat.Android
This plugin depends on https://github.com/jamesmontemagno/CurrentActivityPlugin
The Current Activity plugin adds an Application class to your Android project. Make sure there's only one Application class and attribute in your Android project.
Some plugins as plugin.media, DeviceInfo, CurrentActivity etc. are adding MainApplication.cs that contains MainActivity winch conflict with MainActivity that is already there.
To resolve delete MainApplication.cs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With