[英]Crashlytics Beta build for Android will not install if production build exists: 'The package conflicts with an existing package by the same name'
Our team distributes beta build through Crashlytics and most of us have the production build installed on our phones. 我们的团队通过Crashlytics分发beta版本,我们大多数人都在手机上安装了生产版本。 We aren't able to install the beta build without removing the production app. 我们无法在不删除生产应用的情况下安装测试版。 (Both builds have different applicationId, as in: prod: com.abc
beta: com.abc.beta
) (两个版本都有不同的applicationId,如:prod: com.abc
beta: com.abc.beta
)
We tried using the same keystore (as production) and also a different one to sign the beta build, but it doesn't change anything. 我们尝试使用相同的密钥库(作为生产),也使用不同的密钥库来签署beta版本,但它不会改变任何内容。
Is there a way to install both beta and production builds on the same device? 有没有办法在同一设备上安装beta版和生产版?
After investigating the issue for some time, and thanks to the help from the Fabric team, I've managed to found the issue and also a way to resolve it. 在对该问题进行了一段时间的调查之后,并且感谢Fabric团队的帮助,我设法找到了问题,并找到了解决问题的方法。
Using adb logcat
, I've found the underlying error of the failure: 使用adb logcat
,我发现了失败的潜在错误:
Package attempting to redeclare permission com.abc.permission.C2D_MESSAGE already owned by
It appears that the beta app is trying to write to the same permission file that's owned by the production build. 看来beta应用程序正在尝试写入生产版本所拥有的同一权限文件。 To avoid that, I edited my AndroidManifest.xml
as follows: 为了避免这种情况,我按如下方式编辑了我的AndroidManifest.xml
:
<uses-permission android:name="${applicationId}.permission.C2D_MESSAGE" />
<permission android:name="${applicationId}.permission.C2D_MESSAGE" android:protectionLevel="signature" />
So that the beta app has its own permission folder to write to. 这样beta应用程序就有自己的权限文件夹来写入。
Hope this helps someone out there! 希望这有助于那里的人!
Mike from Fabric here. 来自Fabric的Mike来自这里。 There is an Apple restriction that only allows Testflight or Mobile Device Manager's from installing an app with the same bundle id, so we're prevented from installing over a version installed from the App Store if the bundle id is the same. Apple限制只允许Testflight或移动设备管理器安装具有相同软件包ID的应用程序,因此如果软件包ID相同,我们将无法安装从App Store安装的版本。 For example, you couldn't install a beta production version of the app over the App Store production version. 例如,您无法在App Store生产版本上安装该应用程序的beta版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.