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

INSTALL_FAILED_CONFLICTING_PROVIDER #49

Open
allanckto opened this issue May 8, 2020 · 1 comment
Open

INSTALL_FAILED_CONFLICTING_PROVIDER #49

allanckto opened this issue May 8, 2020 · 1 comment

Comments

@allanckto
Copy link

i haven't encountered the error when i am using the library in two projects. I can only install either one application on testing devices and got this error when i try to install second application to same testing device. Both applications install successfully if i remove this library on either one project.
How do i solve this?

@LocoDelAssembly
Copy link

It is caused by

android:authorities="com.frosquivel.magicalcamera.Provider.PhotoProvider"

Which I guess should have been android:authorities="${applicationId}.provider" like the provider above.

Stumbled upon this problem myself when tried to have two versions of the same app installed (using different applicationIdSuffix).

The solution I found was replicating the provider in the manifest of my app with the corrected android:authorities and using tools:replace to allow the override:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
...
        <provider
            android:name="com.frosquivel.magicalcamera.Provider.PhotoProvider"
            android:authorities="${applicationId}.provider"
            android:exported="false"
            android:grantUriPermissions="true"
            tools:replace="android:authorities"/>
...

Seems to work fine with my app, but your mileage may vary...

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

2 participants