Android Question Dubble declaration in manifest

Cenny

Active Member
Licensed User
Longtime User
Hi,

I get the error 'Dubbele declaraties van het element <uses-permission> 'android.permission.WRITE_EXTERNAL_STORAGE' in manifest met verschillende maxSdkVersions.'
(dubble declarations of the element <uses-permission> 'android.permission.WRITE_EXTERNAL_STORAGE' in manifest with different maxSdkVersions.) when uploading the apk file to the play console.
However, I don't see what I should change.


Manifest:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="33"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.LightTheme)
AddManifestText(
    <uses-permission
      android:name="android.permission.WRITE_EXTERNAL_STORAGE"
      android:maxSdkVersion="19" />)
AddManifestText(
    <uses-permission
      android:name="android.permission.READ_MEDIA_IMAGES"
      android:minSdkVersion="33" />)
AddPermission(android.permission.BLUETOOTH)
AddPermission(android.permission.BLUETOOTH_ADMIN)
AddPermission(android.permission.ACCESS_COARSE_LOCATION)
AddPermission(android.permission.ACCESS_FINE_LOCATION)
AddPermission(android.permission.INTERNET)
AddPermission(android.permission.BLUETOOTH_CONNECT)
AddPermission(android.permission.BLUETOOTH_SCAN)
AddPermission(android.permission.BLUETOOTH_ADVERTISE)
'End of default text.
 

Jmu5667

Well-Known Member
Licensed User
Longtime User
The complaint is the use of android:maxSdkVersion. Try this

B4X:
AddManifestText(
    <uses-permission
      android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>)
AddManifestText(
    <uses-permission
      android:name="android.permission.READ_MEDIA_IMAGES"/>)
 
Upvote 0

Cenny

Active Member
Licensed User
Longtime User
The complaint is the use of android:maxSdkVersion. Try this

B4X:
AddManifestText(
    <uses-permission
      android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>)
AddManifestText(
    <uses-permission
      android:name="android.permission.READ_MEDIA_IMAGES"/>)
Thanks for the help
 
Upvote 0
Top