Failed updates of apps with multiple privileges in the content provider

When I have multiple permissions for a content provider for my android app, the app will install fine, but fail, when I try to replace / update the app via adb install -r

, I get a failed install:

Failed to install app.apk: Failure [INSTALL_FAILED_CONFLICTING_PROVIDER: package cannot be installed in /data/app/com.test.testApp-1: cannot be installed because the vendor name test2 (in the com.test.testApp package) is already in use com. test.testApp]

My app update works fine as long as I have one list of permissions, but as the Android documentation says, multiple permissions are supported .

Multiple powers are listed by separating their names with semicolons.

Here is a snippet of my permissions manifest file:

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

      

It seems that the first authority is interpreted differently from the two second organs. When I try to reinstall the app I get an error provider name test2 (in package com.test.testApp) is already used by com.test.testApp

even though I changed the above permissions to "test2;test3"

.

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

+3


source to share





All Articles