Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error -505 INSTALL_FAILED_DUPLICATE_PERMISSION:

Tags:

android

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: 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

the permission in manifest.

<permission
    android:name="android.permission.CONFIGURE_SIP"
    android:permissionGroup="android.permission-group.COST_MONEY"
    android:protectionLevel="signature" /> 

I have tried protectionLevel both signature and dangerous.

How can I solve this issue.

like image 822
Anil Olakkal Avatar asked Jan 07 '16 06:01

Anil Olakkal


1 Answers

It seems you are trying to declare same permission in two applications.

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" /> 

Be careful to have applicationId value assigned in your Gradle configuration under android > defaultConfig.

like image 91
thetonrifles Avatar answered Oct 07 '22 15:10

thetonrifles