INSTALL_FAILED_CONFLICTING_PROVIDER in Android

前端 未结 10 594
广开言路
广开言路 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 15:59

    CommonsWare has it right, however, there are more details that may help.

    For me, there were two key parts of the solution. First I added $(applicationId) to Manifest provider entry:

            
                
            
    

    Second, when you switch Build Varients, and for me this is between 'debug' and 'release', you also need to Sync Project with Gradle Files. It was not enough to just Clean and Rebuild project.

    In Android Studio there are two tabs in the bottom of the AndroidManifest.xml page. The 'Text' tab you use to edit and the 'Merged Manifest' tab shows the resulting manifest after the build, and for me I can see it was injecting the applicationId properly into the android:authorities section of the provider.

提交回复
热议问题