错误-505 INSTALL_FAILED_DUPLICATE_PERMISSION: [英] Error -505 INSTALL_FAILED_DUPLICATE_PERMISSION:
问题描述
我正在使用android VOIP拨号程序.我无法在设备中同时安装当前应用和旧应用.
I am working on a android VOIP Dialer. I unable to install my current app along with old app in a device.
01-07 12:05:05.115:E/Finsky(28214):[1] PackageInstallerImpl $ 2.onReceive:安装com.current.app时发生错误-505:INSTALL_FAILED_DUPLICATE_PERMISSION:包com.current.app试图重新声明权限com.old.app已拥有android.permission.CONFIGURE_SIP
01-07 12:05:05.115: E/Finsky(28214): [1] PackageInstallerImpl$2.onReceive: Error -505 while installing com.current.app: INSTALL_FAILED_DUPLICATE_PERMISSION: Package com.current.app attempting to redeclare permission android.permission.CONFIGURE_SIP already owned by com.old.app
清单中的权限.
<permission
android:name="android.permission.CONFIGURE_SIP"
android:permissionGroup="android.permission-group.COST_MONEY"
android:protectionLevel="signature" />
我尝试了protectionLevel签名和危险级别.
I have tried protectionLevel both signature and dangerous.
我该如何解决这个问题.
How can I solve this issue.
推荐答案
似乎您正在尝试在两个应用程序中声明相同的权限.
It seems you are trying to declare same permission in two applications.
为了同时安装两个应用程序,此问题的常见解决方案是使用动态前缀作为您的权限,以防止与其他应用程序发生冲突(GCM配置也是如此):
In order to keep both application installed, common solution for this problem is to use a dynamic prefix for your permission, preventing conflicts with other apps (as it happens for GCM configuration too):
<permission
android:name="${applicationId}.permission.CONFIGURE_SIP"
android:permissionGroup="${applicationId}.permission-group.COST_MONEY"
android:protectionLevel="signature" />
请注意,在 android>下的Gradle配置中分配了
. applicationId
值.defaultConfig
Be careful to have applicationId
value assigned in your Gradle configuration under android > defaultConfig
.
这篇关于错误-505 INSTALL_FAILED_DUPLICATE_PERMISSION:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!