问题描述
我在商店7的应用程序,但是当我尝试安装其中的3个,我得到关于这些3,我尝试安装的第二个副本提供权威的错误。
I have 7 apps on store, but when I try to install 3 of them I get duplicate provider authority error on the second of these 3 that I try to install.
无我的应用程序有明显的提供商...
none of my apps have provider in manifest...
任何想法?
推荐答案
我面临着同样的问题。然后我检查了充分表现为在comment通过以上Commonsware。我完全清单是有一个供应商,而是因为它是从合并发挥服务测量
库模块,所以第一眼看上去还行给我。
I faced the same issue. I then checked the full manifest as suggested in the comment above by Commonsware. My full manifest was having a provider but as it was merged from play-service-measurement
library module, so at first glance it looked okay to me.
但实际上它有问题,由于它的权威。此汇市正确地宣布当局在其清单与 $ {}的applicationID
占位符为preFIX属性。但由于在构建系统中的错误,如果应用程序的的build.gradle
并没有任何已的applicationID
那么这个占位符正在通过库的包名称,而不是我们的应用程序的软件包名称代替。这可能会导致有此提供相同的权限多个应用程序。这里是。
But actually it had the issue due to its authority. This provider has correctly declared its authorities attribute in its manifest with ${applicationId}
placeholder as a prefix. But due to a bug in build system, if app's build.gradle
does not has any applicationId
then this placeholder is being replaced by library's package name instead of our app's package name. It may result in multiple apps having same authority for this provider. Here is a link for this issue.
作为一种变通方法,我们就可以声明的applicationID在我们的的build.gradle
,它可以保持相同在大多数情况下表现的包名。如果你想保持不同的值,这两个,你可以了解的。
As a workaround, we can just declare an applicationId in our build.gradle
, which can be kept same as package name in manifest in most cases. In case you want to keep different values for these two, you can read further about the differences between manifest's package name and build.gradle's applicationId
.
这篇关于在没有提供应用程序的Android重复提供权威的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!