在控制台安装显示错误:安装失败相互冲突的提供商 [英] Install shows error in console: INSTALL FAILED CONFLICTING PROVIDER

查看:135
本文介绍了在控制台安装显示错误:安装失败相互冲突的提供商的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试用在Android SDK中的NotesList示例程序。我做了该计划的轻微变化,但是当我安装我的编辑的版本,我不断收到消息INSTALL_FAILED_CONFLICTING_PROVIDER控制台,当我尝试安装它时,原来的Notes程序已经在设备上。我需要什么,在提供变更,使之成为独一无二的数据库?它工作正常,如果我卸载原来的笔记程序,然后安装我的编辑过的版本。

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.

推荐答案

权威,如上市安卓当局必须是唯一的。引用这方面的文档属性

The authority, as listed in android:authorities must be unique. Quoting the documentation for this attribute:

要避免冲突,当局名称应使用Java风格的命名约定(如com.example.provider.cartoonprovider)。通常情况下,它是ContentProvider的子类实现提供者的名称

To avoid conflicts, authority names should use a Java-style naming convention (such as com.example.provider.cartoonprovider). Typically, it's the name of the ContentProvider subclass that implements the provider

这篇关于在控制台安装显示错误:安装失败相互冲突的提供商的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆