INSTALL_FAILED_CONFLICTING_PROVIDER in Android

前端 未结 10 593
广开言路
广开言路 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:54

    The android :authorities value is the package name.

    In this case, it happens to be the package name. It simply has to be unique.

    The android:name is the name of the class of that provider

    Correct.

    If I change the package name, to another one different than the com.google etx, and rename all the references/ imports of that package, should the problem go away?

    The package name has nothing to do with it. You may need to change that as well, though, for your app to be able to be installed alongside the regular, un-modified app.

    You need to have a unique value for android:authorities, and the code in your app that uses this ContentProvider needs to use an appropriate Uri (content://whatever.you.change.the.authority.to/...).

提交回复
热议问题