Build error "The type 'BaseVideoView' already contains a definition for 'PlayerStateChanged'" when integrating android library in .net maui application

Suvarna KR 0 Reputation points
2024-06-10T10:51:40.6233333+00:00

I have an native android library for video player and added this library(.aar) to android binding library in .net maui 8.0 to integrate the library with .net maui. I have followed the steps in the link "https://www.reddit.com/r/dotnetMAUI/comments/1blorzr/integrating_native_third_party_sdk_in_net_maui/" .But getting the build errors which are shown in screenshot. To fix these errors i added a metadata file by adding the class modes. After adding the metadata.xml all the build errors are resolved, but the .net classes generated by the metadata file added doesnot have the methods available in android library. Please provide the solutions to fix these build errors.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,200 questions
{count} votes