Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] FileProvider android in maui and xamarin.essentials conflict #2705

Closed
yunusefendi52 opened this issue Sep 27, 2021 · 3 comments
Closed
Labels
area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info t/bug Something isn't working

Comments

@yunusefendi52
Copy link
Contributor

Description

Add reference (or as dependency) https://www.nuget.org/packages/xamarin.essentials causing conflict fileProvider in maui xamarin.essentials with error compilation error XA4215: The Java type 'xamarin.essentials.fileProvider' is generated by more than one managed type. Please change the [Register] attribute so that the same Java type is not emitted.

Steps to Reproduce

  1. Create maui app (with maui essentials)
  2. Add reference (or as dependency) to https://www.nuget.org/packages/xamarin.essentials
  3. build project

Expected Behavior

Success compilation and can run the app

Actual Behavior

Error compilation

Basic Information

  • Version with issue: 6.0.100-rc.1.21463.6
  • Last known good version:
  • IDE: vscode (with command line)
  • Platform Target Frameworks:
    • iOS:
    • Android: 10
    • UWP:
  • Android Support Library Version:
  • Nuget Packages:
  • Affected Devices:

Screenshots

Reproduction Link

Workaround

@Dreamescaper
Copy link

Why do you need to add reference for Xamarin.Essentials?

@yunusefendi52
Copy link
Contributor Author

There are libraries that uses Xamarin.Essentials without Xamarin.Forms, I use Xamarin.Essentials.Interfaces and I am trying to port to maui and just want to see if the build is success and the app is running without changing the Xamarin.Essentials.Interfaces part. But I think It'd be better if the FileProvider changed anyway to maui's own name (maui.essentials.fileProvider maybe)

Name = "xamarin.essentials.fileProvider",

@Redth Redth added the area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info label Sep 27, 2021
@jsuarezruiz jsuarezruiz added the t/bug Something isn't working label Oct 22, 2021
@yunusefendi52
Copy link
Contributor Author

This should be fixed by #4211

@ghost ghost locked as resolved and limited conversation to collaborators Feb 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants