document_scanner_flutter
document_scanner_flutter copied to clipboard
INSTALL_FAILED_CONFLICTING_PROVIDER: Package couldn't be installed
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.
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>
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
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.
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?
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.
@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