INSTALL_FAILED_CONFLICTING_PROVIDER in Android

前端 未结 10 458
广开言路
广开言路 2021-01-01 15:08

I am using an open-srouce code from Google for an app called MyTracks.

I am getting this error when the original app is installed on the phone.

INSTA         


        
相关标签:
10条回答
  • 2021-01-01 16:03

    I got this same error when I changed the package name in my app's manifest. This creates a conflict when you try to install the app again (with the new package name). The solution is to remove the old version of the app (that uses the old package name), then you'll be able to install the new version.

    0 讨论(0)
  • 2021-01-01 16:04

    Just Uninstall the application from the device which you are trying to run and try to reinstall application again. The existing application is conflicting with the new one.

    0 讨论(0)
  • 2021-01-01 16:05

    If you are using Google Maps + Google Play Services inside a library project, you can encounter this error when you try to run an app that uses your library, while a different app that uses the same library is already installed on your device.

    Fix: make sure that defaultConfig.applicationId is defined in 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 of the specific app. With this fix, the provider names will no longer conflict, and your app will run as expected.

    Symptoms

    1.) Your users are seeing the dreaded "-505" install error when installing your app from the Play Store.

    2.) You will see this error message when you try to install a second app that uses your library via Android Studio:

    In your console, you will see a message like this:

    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
    

    The fix is to make sure that defaultConfig.applicationId is defined in android section of the build.gradle file for each project using your library

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

    More reading can be found here in the original bug report: Issue 784: Multiple apps using same authority provider name

    0 讨论(0)
  • 2021-01-01 16:08

    just uninstall helloFacebooksample app from you device

    0 讨论(0)
提交回复
热议问题