4

When I have more than one authority listed for a content provider for my Android app, the app will install fine, but will fail when I try to replace/update the app via adb install -r, I get a failed installation:

Failed to install app.apk: Failure [INSTALL_FAILED_CONFLICTING_PROVIDER: Package couldn't be installed in /data/app/com.test.testApp-1: Can't install because provider name test2 (in package com.test.testApp) is already used by com.test.testApp]

My app updates work fine while I have a single authority listed, but as the Android documentation states, multiple authorities are supported.

Multiple authorities are listed by separating their names with a semicolon.

Here's a snippet of my manifest file with the authorities:

<provider
    android:name=".data.ContentProvider"
    android:authorities="test1;test2"
    ... />

It seems like the first authority is being treated differently from the second two authorities. When I try to reinstall the app, I get the failure message of provider name test2 (in package com.test.testApp) is already used by com.test.testApp, even if I change the above authorities to "test2;test3".

Has anyone had success with app updates using multiple authorities for a single content provider?

ccpmark
  • 1,005
  • 1
  • 10
  • 11

0 Answers0