Install_Failed_Duplicate_Permission... C2D_Message

Installation failed with message INSTALL_FAILED_DUPLICATE_PERMISSION… C2D_MESSAGE possibilities

@commonsware blogs has explain it in details in Custom Permission Vulnerability and the 'L' Developer Preview:

Near as I can tell, the “L” Developer Preview requires that all apps
with a <permission> element for the same android:name value be signed
by the same signing key. The actual protectionLevel or other values
inside the <permission> does not matter. Even if they are identical, an
app trying to define the <permission> will fail to install if an
existing installed app already defines the <permission>. Specifically,
the installation of the second app will fail with an
INSTALL_FAILED_DUPLICATE_PERMISSION error.

Here the answer from @commonsware: https://stackoverflow.com/a/11730133/4758255

Error -505 INSTALL_FAILED_DUPLICATE_PERMISSION:

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.

C2D_message is not unique while trying to make sign apk

You may refer with this post.

Remove

<uses-permission android:name="${applicationId}.permission.C2D_MESSAGE"/>
<permission
android:name="${applicationId}.permission.C2D_MESSAGE"
android:protectionLevel="signature"/>

Run App then add the permisson again and Run App.

This problem often occurs when you try to install debug and release version of your app on the same device.

INSTALL_FAILED_DUPLICATE_PERMISSION error when installing Yahoo Mail apk on Samsung Galaxy S6 using Appium

On Android 5.0+, two apps cannot have the same <permission> element, creating the same permission, unless they are signed by the same signing key. In your case, the Galaxy S6 already has something that defined this permission, and it has a different signing key than the one that somebody used to sign your APK.



Related Topics



Leave a reply



Submit