Could not resolve reference to 'Android.Support.V7.App.NotificationCompat/MediaStyle'...
See original GitHub issueHi,
I’ve been using your plugin for a new project and it worked really well (I do really owe you my compliments, a really clean and fast solution for medias) until I switched from Debug to Release.
When in release, trying to build the solution, I got an unresolvable error
Severity Code Description Project File Line Suppression State Error The "LinkAssemblies" task failed unexpectedly. Java.Interop.Tools.Diagnostics.XamarinAndroidException: error XA2006: Could not resolve reference to 'Android.Support.V7.App.NotificationCompat/MediaStyle' (defined in assembly 'Plugin.MediaManager, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null') with scope 'Xamarin.Android.Support.v7.AppCompat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. When the scope is different from the defining assembly, it usually means that the type is forwarded. ---> Mono.Cecil.ResolutionException: Failed to resolve Android.Support.V7.App.NotificationCompat/MediaStyle at Mono.Linker.Steps.MarkStep.HandleUnresolvedType(TypeReference reference) at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference) at MonoDroid.Tuner.MonoDroidMarkStep.MarkType(TypeReference reference) at Mono.Linker.Steps.MarkStep.MarkField(FieldReference reference) at Mono.Linker.Steps.MarkStep.InitializeFields(TypeDefinition type) at Mono.Linker.Steps.MarkStep.InitializeType(TypeDefinition type) at Mono.Linker.Steps.MarkStep.InitializeAssembly(AssemblyDefinition assembly) at Mono.Linker.Steps.MarkStep.Initialize() at MonoDroid.Tuner.MonoDroidMarkStep.Process(LinkContext context) at Mono.Linker.Pipeline.Process(LinkContext context) at MonoDroid.Tuner.Linker.Process(LinkerOptions options, ILogger logger, LinkContext& context) at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res) --- End of inner exception stack trace --- at Java.Interop.Tools.Diagnostics.Diagnostic.Error(Int32 code, Exception innerException, String message, Object[] args) at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res) at Xamarin.Android.Tasks.LinkAssemblies.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() SmartCity.Android
The project has latest Xamarin.Forms tools and latest Xamarin.Android tools, here details:
- NETStandard.Library, installed in: PCL v2.0.3
- Xamarin.Android.Support.Design, installed in: Project.Android v27.0.2.1
- Xamarin.Android.Support.v4, installed in: Project.Android v27.0.2.1
- Xamarin.Android.Support.v7.AppCompat, installed in: Project.Android v27.0.2.1
- Xamarin.Android.Support.v7.CardView, installed in: Project.Android v27.0.2.1
- Xamarin.Android.Support.v7.MediaRouter, installed in: Project.Android v27.0.2.1
- Xamarin.Forms, installed in each project (PCL, Android, iOS), v3.1.0.697
- Plugin.MediaManager, installed in each proj(PCL, Android, iOS), v0.4.5
This packages (exception made for Plugin.MediaManager obviously) are the default, generated by the system within the solution.
Steps to reproduce 📜
-
Create new Xamarin.Forms PCL solution
-
Install Plugin.MediaManager
-
Switch build to Release
-
Rebuild project
Things I tried
-
Install Plugin.MediaManager.Forms in each project in the solution with and without Plugin.MediaManager installed
-
Install Plugin.MediaManger only in Droid proj and installing Plugin.MediaManager.Forms in each project.
-
Tried a lot of combinations, also tried to download latest stable branch and generate .dlls.
-
To check if it was just my solution I tried to create a new, empty, PCL project, including both Android and iOS, when installing the NuGet it still gave me the same error.
Still couldn’t manage to solve the situation.
Expected behavior 🤔
Build in Release without errors
Actual behavior 🐛
Can’t build in Release
Configuration 🔧
Version: 0.4.5
Platform:
- 📱 iOS
- 🤖 Android
- 🏁 WPF
- 🌎 UWP
- 🍎 MacOS
- 📺 tvOS
- [ x ] 🐒 Xamarin.Forms
Thank you for your help.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:7
- Comments:7 (1 by maintainers)
Top GitHub Comments
As also said in a lot of other issues. This project is a lot of work, and it would help a lot if your company starts paying for what they use. I can provide an updated version a lot sooner when that happens, otherwise you got to wait until it is finished.
Hi once again rise the issue, Plugin.MediaManager is not working for Livestreaming RTSP Url based Here not working means, play, pause and stop not working
Can you please tell me the solution for this
I am waiting for reply
Thank You