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: Package couldn't be installed #19

Open
rishabhj126 opened this issue Mar 10, 2022 · 6 comments
Open

Comments

@rishabhj126
Copy link

rishabhj126 commented Mar 10, 2022

Trying to install same dependency in two apps gives

Failure [INSTALL_FAILED_CONFLICTING_PROVIDER: Package couldn't be installed in /data/app/com.ysh.sdb--5GF3pMkE5_bKqOwmq56_g==: Can't install because provider name com.scanlibrary.provider (in package com.ysh.sdb) is already used by com.ysh.xzsd] Error launching application on LON AL00.

@rajada1
Copy link

rajada1 commented Mar 10, 2022

add this in /android/app/src/main/AndroidManifest

<provider android:name="androidx.core.content.FileProvider" android:authorities="${applicationId}.flutter_inappwebview.fileprovider" tools:replace="android:authorities" android:exported="false" android:grantUriPermissions="true"> <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/provider_paths" /> </provider>

@samoray1998
Copy link

hey @rishabhj126 ,i think your phone already have an app that uses the same package try to uninstall it and and run your new app .
i hope this will solve your problem

@rajada1
Copy link

rajada1 commented May 11, 2022

hey @rishabhj126, acho que seu telefone já tem um aplicativo que usa o mesmo pacote tente desinstalá-lo e executar seu novo aplicativo . espero que isso resolva o seu problema

This is not a viable solution.

@rishabhj126
Copy link
Author

hey @rishabhj126 ,i think your phone already have an app that uses the same package try to uninstall it and and run your new app .

i hope this will solve your problem

But both app requires to have same feature then what to do?

@samoray1998
Copy link

i know that it's not a great solution but it may save a lot of people time, i had the same issue and i solve it this way ,so,just try at the first beginning to remove the old app and test the new one and see if it works for you.

@sanjeevinnobit
Copy link

@rishabhj126 you are facing this issue because the package owner has not handled the FIleProvider properly.

I have made some changes and fixed this issue

Please follow the below steps, it will resolve your problem:

Step 1: In your pubspec.yaml file (remove document scanner and add this)

document_scanner_flutter:
  git:
    url: https://github.com/sanjeevinnobit/document_scanner_flutter.git
    ref: master

Step 2: add this in /android/app/src/main/AndroidManifest

<provider
    android:name="androidx.core.content.FileProvider" 
    android:authorities="${applicationId}.provider"
    android:exported="false"
    android:grantUriPermissions="true">
    <meta-data
        android:name="android.support.FILE_PROVIDER_PATHS"
        android:resource="@xml/provider_paths" />
</provider>

Step 3: in your /android/app/build.gradle

minSdkVersion 21

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

4 participants