Skip to content

[BUG] MediaElement Android video player throws exception #2480

@xiufengpeng

Description

@xiufengpeng

Is there an existing issue for this?

  • I have searched the existing issues

Did you read the "Reporting a bug" section on Contributing file?

Current Behavior

in .net 9 maui, upgraded to the latest nuget packages as of today (27 Jan. 2025), MediaLElement version 6.0.0
When load the video player on Android (API 22), the following error threw:

Could not determine Java type corresponding to AndroidX.Media3.ExoPlayer.IExoPlayerInvoker, Xamarin.AndroidX.Media3.ExoPlayer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. (Parameter 'targetType')

Expected Behavior

Video player worked fine prior to the nuget upgrades, video will play in the mediaElement. The new community toolkit nuget package broke the video player.

Steps To Reproduce

in. net 9 with all the latest nuget packages,

  1. Create a Xaml PAGE with the mediaElement instance.
  2. Set the mediaElement source video to a local video.
  3. When the page load, the exception throws

Link to public reproduction project repository

na

Environment

- .NET MAUI CommunityToolkit: latest nuget package as 27 Jan 2025
- .Net 9
- .on Android API 31

Anything else?

The problem only happens on Android verison.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions