Updated 22 December 2016
In this blog,
I have shown you when to come this issue and how to resolve it.
This is issue commonly comes in <5.1 version. Means Lollipop or greater version. And if you use the same permission in manifest then error shows,
INSTALL_FAILED_DUPLICATE_PERMISSION perm=com.app.permission.C2D_MESSAGE pkg=com.app
We will give the example of GCM permission,
You can use the ${applicationId} on the place of
packageName
in AndroidManifest.xml file.
Replace
1 2 3 4 5 |
<permission android:name="com.demoapp.webkul.permission.C2D_MESSAGE" android:protectionLevel="signature"/> <uses-permission android:name="com.demoapp.webkul.permission.C2D_MESSAGE"/> |
to
1 2 3 4 5 |
<permission android:name="${applicationId}.permission.C2D_MESSAGE" android:protectionLevel="signature"/> <uses-permission android:name="${applicationId}.permission.C2D_MESSAGE"/> |
And in receiver’s intent-filter:
replace
1 |
<category android:name="com.demoapp.webkul"/> |
to
1 |
<category android:name="${applicationId}"/> |
And DUPLICATE_PERMISSION issue will be resolved.
If you have more details or questions, you can reply to the received confirmation email.
Back to Home
2 comments
Maybe you have written something wrong in your manifest file. If you share your code snippet then we may solve your problem.
Thanks.