Installation shows an error in the console: INSTALL THE CONFLICT SUPPLIER FAULT

I am experimenting with the sample NotesList program in the Android SDK. I changed the program a bit, but when I install my edited version, I continue to receive the INSTALL_FAILED_CONFLICTING_PROVIDER message in the console when I try to install it when the original notes program is already on the device. What do I need to change in the Provider to make it a unique database? It works great if I remove the original notes program and then install my edited version.

+117
android android-contentprovider
Apr 28 '13 at 20:57
source share
16 answers

The power specified in android:authorities must be unique. Quoting the documentation for this attribute :

To avoid conflicts, authorization names should use a Java-style naming convention (e.g. com.example.provider.cartoonprovider). Typically, this is the name of the ContentProvider subclass that the provider implements.

+155
Apr 28 '13 at 21:17
source share

If you have different options and want to avoid conflicts in the name of the organ, you can add applicationIdSuffix to create types and use the resulting applicationId in your manifest, for example:

 <... android:authorities="${applicationId}.contentprovider"/> 
+102
May 7, '15 at 2:11
source share

If you use Google Maps + Google Play Services in a library project (especially if you recently migrated from Eclipse to Android Studio), you may encounter this error when trying to launch an application using your library, while another application using one and The same library is already installed on your device.

Fix: make sure defaultConfig.applicationId is defined in the Android section of the build.gradle file for each project using your library

 android { defaultConfig.applicationId = "com.company.appname" } 

I would recommend using the package name for a specific application. With this fix, the vendor names will no longer conflict, and your application will work as expected.

Symptoms

1.) Your users see a terrible installation error "-505" when installing your application from the Play Store.

2.) You will see this error message when you try to install a second application that uses your library through Android Studio [INSTALL_FAILED_CONFLICTING_PROVIDER]:

Conflicting Provider

In your console, you will see the following message:

 Package couldn't be installed in /data/app/com.company.appname-1 com.android.server.pm.PackageManagerException: Can't install because provider name com.google.android.gms.measurement.google_measurement_service (in package com.company.appname) is already used by com.company.otherInstalledAppName 

Fix this to make sure defaultConfig.applicationId is defined in the Android section of the build.gradle file for each project using your library

 android { defaultConfig.applicationId = "com.company.appname" } 

Further reading can be found here in the original error report: Issue 784: multiple applications using the same credential provider name

+30
Jan 18 '16 at 22:19
source share

This can also happen if you have an older version of your application installed and changes have been made to the library (support) or manifest file. Removing old applications from your device ( Settings --> Application --> <your application> --> Uninstall ) will solve the problem.

+23
Sep 16 '14 at 19:04
source share

If you use the SDK for Facebook, the problem may be in the “credentials” that you give to the Facebook provider.

REPLACE -

 <provider android:name="com.facebook.FacebookContentProvider" android:authorities="com.facebook.FacebookContentProvider" android:exported="true" /> 

WITH →

 <provider android:name="com.facebook.FacebookContentProvider" android:authorities="com.facebook.FacebookContentProvider[YOUR_APP_ID]" android:exported="true" /> 

You may need to modify defaultConfig.ApplicationId as suggested in other answers.

+19
Nov 09 '16 at 16:11
source share

The same error can occur after renaming packages. Check the value in the string.xml file for android:authorities on AndroidManifest.xml.

 <provider android:authorities="@string/content_authority" android:name=".data.Provider" ... /> 

In string.xml, the value must match the name of your package declared in the manifest.

 <string name="content_authority">com.whatever.android.sunshine.app</string> 
+15
Dec 21 '14 at 15:14
source share

The name of the governing body / provider indicated in the manifest is probably

+8
Apr 28 '13 at 21:00
source share

This basically happened to me when I tried to change the application package name.

So, in the emulator, the same application was installed earlier. When I tried to install the application after changing the package name, he said that the permissions are already used by the old application on the device.

Just after uninstalling the application, he solved my problem.

In addition, the name of the authority should always be: your.package.name.UNIQUENAME ;

example:

  <provider android:name="com.aviary.android.feather.cds.AviaryCdsProvider" android:authorities="your.package.name.AviaryCdsProvider" /> 
+6
Jun 10 '16 at 21:13
source share

If you use Facebook inside the application, check the provider tag inside the AndroidManifest file and verify that your project Id correct for android:authorities

 <provider android:name="com.facebook.FacebookContentProvider" android:authorities="com.facebook.app.FacebookContentProvider112623702612345" android:exported="true" /> 
+5
Jun 27 '17 at 8:20
source share

I had a similar problem when I used the same library in multiple applications. It was just necessary to update AndroidManifest.xml, indicating this exact declaration of the provider below.

 <manifest ...> <application ...> <provider android:name="android.support.v4.content.FileProvider" android:authorities="${applicationId}.here.this.library.provider" android:exported="false" android:grantUriPermissions="true" tools:replace="android:authorities"> </provider> </application> </manifest> 
+4
Feb 13 '18 at 19:21
source share

I tried many solutions, but could not find a solution ... but this link helped me ... I want to talk in detail about the problem ...

I ran test cases with tools, so my application was not visible in the launch bar ... but it was installed and thus used the same content provider . So I have to somehow remove it. So Settings -> Application Manager -> All Downloaded Apps -> uninstall all apps from your current development package

Now try to run ... This will work ...

+3
Jan 10 '17 at 13:42 on
source share

installing using adb with the command ./adb install -r abc.apk will solve the problem (it will overwrite even if the device has a higher version of the application)

+2
Mar 10 '17 at 2:58
source share

This issue has been detected.

Solved this by:

1 - open AndroidManifest.xml

2 - Ctrl + F find "provider"

3 - find the provider and update the name of your root directory there.

run the project. I hope the problem will be fixed!

+1
Apr 23 '18 at 21:29
source share

I thought that uninstalling the application by dragging its icon to “Delete” would solve the problem, but it is not.

Here is what solved the problem:

  1. Go to settings
  2. Choose apps
  3. Find your application (yes, I was surprised that I still found it here!) And click on it
  4. In the upper right corner, click 3 dots
  5. Select " Delete for all users. "

Try again, this should work now.

+1
Jul 27 '18 at 6:00
source share

There were different versions of the same application on my Android device. This gives me an error INSTALL CONFLICT PROVIDER FAILURE . therefore, I uninstall all versions of the same application. and tried

adb install -r/Users/demo-debug-92acfc5.apk

This solved my problem.

0
Feb 15 '18 at 9:18
source share

If you use Xamarin and get this error (possibly due to Firebase.Crashlytics):

 INSTALL_FAILED_CONFLICTING_PROVIDER Package couldn't be installed in [...] Can't install because provider name dollar_openBracket_applicationId_closeBracket (in package [...]]) is already used by [...] 

As mentioned here , you need to update Xamarin.Build.Download:

  1. Update the Nuget package for Xamarin.Build.Download to version 0.4.12-preview3.
    • On a Mac, you may need to select the Show Previews check box in the Add Packages window.
  2. Close Visual Studio
  3. Remove all cached NuGet package locations:
    • On Windows, open Visual Studio, but not the solution:
      • Tools -> Option -> Nuget Package Manager -> General -> Clear All Nuget Cache
    • On a Mac, wipe the following folders:
      • ~/.local/share/NuGet
      • ~/.nuget/packages
      • packages folder in solution
  4. Delete bin / obj folders in solution
  5. Download Solution
  6. Nuget package recovery for solution (should start automatically)
  7. rebuild
0
Jun 20 '19 at 5:06
source share



All Articles