Android Manifest Duplicate Permissions Android Manifest Duplicate Permissions android android

Android Manifest Duplicate Permissions


In your App manifest file add the below merge rule.

<uses-permission-sdk-23        tools:node="removeAll" />

Make sure you already added the location permission.

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />


Just replace below line to your existing uses permission would solve the issues.

What this causes because you added duplicated permission in manifest but below line split the permission.

<uses-permission      android:name="android.permission.ACCESS_COARSE_LOCATION"      android:maxSdkVersion="22"/>


As described in this post, you have to specify how the Manifest should handle permissions. You probably included a library that transitively already requires this permission, e.g., READ_PHONE_STATE.

<uses-permission android:name="android.permission.READ_PHONE_STATE" />

If you re-declare this permission in your manifest, it gives a warning, because it does not know how to handle these two declarations (even though they probably just state the same).

If you are willing to forward this permission in you app, you can fix it like this:

<uses-permission tools:node="merge" android:name="android.permission.READ_PHONE_STATE" />

If you are unwilling to forward that permission in your app, you can explicitly remove this permission:

<uses-permission tools:node="remove" android:name="android.permission.READ_PHONE_STATE" />