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

FileProvider collision error #97

Open
LebonNic opened this issue Jan 5, 2022 · 2 comments
Open

FileProvider collision error #97

LebonNic opened this issue Jan 5, 2022 · 2 comments

Comments

@LebonNic
Copy link

LebonNic commented Jan 5, 2022

Hi!

I am trying to integrate your library into an existing application and I get the following error:

Error: Attribute provider#androidx.core.content.FileProvider@authorities value=(com.appname.client.fileprovider) from AndroidManifest.xml:37:13-72 is also present at [io.github.ParkSangGwon:tedimagepicker:1.2.7] AndroidManifest.xml:34:13-60 value=(com.company.appname.provider). Suggestion: add 'tools:replace="android:authorities"' to <provider> element at AndroidManifest.xml:35:9-43:20 to override.

In my application I already use a FileProvider and it collides with the one declared in your library. You should follow the recommendations of this article to avoid this problem: https://commonsware.com/blog/2017/06/27/fileprovider-libraries.html

Best regards,
Nicolas

@LebonNic LebonNic changed the title FileProvider colision error FileProvider collision error Jan 5, 2022
@bymagnum
Copy link

I join this one, I can't build the application due to the fact that there is not enough separately created FileProvider class, my manifest swears at merging the same names androidx.core.content.FileProvider

scyclops added a commit to scyclops/TedImagePicker that referenced this issue Sep 30, 2024
@tbassett44
Copy link

tbassett44 commented Oct 23, 2024

I fixed this by updating my AndroidManifest.xml, the instructions in the error were not complete in the error, but enough to get started.

In the < manifest > tag, include xmlns:tools="http://schemas.android.com/tools"
In the < provider > tag at issue, include tools:replace="android:authorities"
in the < meta-data > tag in the tag, include tools:replace="android:resource"

I honestly dont know why those things work, but trial and error got me to an app build and the image picker working in my app. Im not sure if it is fully functional either, but to at least have picking an image working is a big step because ive been dealing with this issue for a number of months at this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants