Android重复提供者权限问题 [英] Android duplicate provider authority problem

查看:24
本文介绍了Android重复提供者权限问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在尝试发布一款休闲应用的付费无广告版本,该应用目前随广告免费发布.我们将所有包名重构为com.mycompanyname.appname.pro,市场上免费的基本上没有.pro 结尾.我们还进入了我们的内容提供者并将权限更改为与包名称相同.所以免费版"有

We're trying to publish a pay ad-free version of a casual app that's currently published free with ads. We refactored all package names to com.mycompanyname.appname.pro, the free one on market doesn't have the .pro at the end, basically. We also went into our content provider and changed the authority to the same as the package name. So the "free version" has

AUTHORITY = "com.mycompanyname.appname" 

而且无广告付费版有

AUTHORITY = "com.mycompanyname.appname.pro" 

但我们仍然无法在同一设备上同时安装免费版和专业版"版本.不管价值如何,提供者的类名在两个应用程序中都是相同的.

but still we are unable to install both the free and the "pro" version on the same device. For whatever it's worth, the class name for the provider is the same in both apps.

我们无法直接从 apk 安装,如果我们尝试从 Android 市场下载,我们会收到重复的提供商权限"错误消息.

We can't install from an apk directly, and if we try to download from Android market we get a "duplicate provider authority" error message.

我们缺少什么?我们是否需要在其他地方寻找问题,或者我们这里有什么根本错误?

What are we missing? Is there another place we need to look for problems, or have we got something fundamentally wrong here?

推荐答案

谷歌默认在你的APP中添加应用测量提供者,所以在build.gradle文件中你需要在android标签exaple下定义applicationID默认配置 {一个applicationId "com.example.my.app"minSdkVersion 15targetSdkVersion 19版本代码 1版本名称1.0"}

Google by default add app measurement provider in your APP so in build.gradle file you need to define applicationID under android tag exaple defaultConfig { applicationId "com.example.my.app" minSdkVersion 15 targetSdkVersion 19 versionCode 1 versionName "1.0" }

这篇关于Android重复提供者权限问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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