0

Ive wrote an app. Everthing was fine but then i wanted to work on it on my computer at home. The problem is that i receive the error message "INSTALL_FAILED_DUPLICATE_PERMISSION" when i want to start the app in the emulator. At work I use the same settings for the emulator. And there werent problems with other apps when i tried to work on it on 2 different computers.

Sorry if I havent gave u enough informations, but i am new in programming.

Maybe somebody have made similar experiences and could help me with it.

Thanks in Advance!

mayyonette
  • 23
  • 2
  • Possible duplicate of - https://stackoverflow.com/questions/27043933/install-failed-duplicate-permission-c2d-message – Neo May 31 '21 at 14:15

2 Answers2

1

You can use the ${applicationId} on the place of packageName in AndroidManifest.xml file.

Replace

<permission
android:name="com.example.testapp.permission.C2D_MESSAGE"
android:protectionLevel="signature"/>

<uses-permission android:name="com.example.testapp.permission.C2D_MESSAGE"/>

to

<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

<category android:name="com.example.testapp"/>

to

<category android:name="${applicationId}"/>

And DUPLICATE_PERMISSION issue will be resolved.

0

Check AndroidManifest.xml for duplicate permissions.

Have look at this : https://github.com/OneSignal/react-native-onesignal/issues/352