Install shows error in console: INSTALL FAILED CON

2019-01-03 05:19发布

I am experimenting with the NotesList sample program in the Android SDK. I've made a slight variation in the program, but when I install my edited version I keep getting the message INSTALL_FAILED_CONFLICTING_PROVIDER in the console when I try to install it when the original notes program is already on the device. What do I need to change in the Provider to make it a unique database? It works fine if I uninstall the original notes program and then install my edited version.

15条回答
闹够了就滚
2楼-- · 2019-01-03 05:45

I have tried many solution but could not find solution... but this link helped me... I want to give detail about issue...

I was running Instrumented test cases so my app was not visible in launcher... but it was installed and thus using Same Content Provider. So, I should uninstall it somehow. So Settings -> Application Manager -> All Downloaded Apps -> uninstall all apps from your current development package

Now, try to run... This will work...

查看更多
男人必须洒脱
3楼-- · 2019-01-03 05:47

In my android device I had different flavors of the same app install. This gives me error INSTALL FAILED CONFLICTING PROVIDER. so I uninstall my all flavors of the same app. and tried

adb install -r /Users/demo-debug-92acfc5.apk

It solved my problem.

查看更多
看我几分像从前
4楼-- · 2019-01-03 05:48

Basically this happened with me, when i tried to change the package name of the app.

So, in emulator, same app was installed before. When i tried to install app after changing package name, it said, authority already used by older application in device.

Simply after uninstalling the application, it solved my problem.

Also, Authority name should always be : your.package.name.UNIQUENAME;

example :

  <provider
        android:name="com.aviary.android.feather.cds.AviaryCdsProvider"
        android:authorities="your.package.name.AviaryCdsProvider"
       />
查看更多
登录 后发表回答