charlesbodman / cordova-plugin-ironsource-ads

Cordova plugin for IronSource ads
MIT License
17 stars 16 forks source link

Duplicate android.permission.WRITE_EXTERNAL_STORAGE #20

Open supravirtual opened 5 years ago

supravirtual commented 5 years ago

I have installed Cordova 8.1.2 (cordova-lib@8.1.1), Android 8.0.0 and gradle 5.3.1 and the build fails with the following error:

/home/development/cordova/appname/platforms/android/gradlew: Command failed with exit code 1 Error output: /home/development/cordova/appname/platforms/android/app/src/main/AndroidManifest.xml:49:5-108 Error: Element uses-permission#android.permission.WRITE_EXTERNAL_STORAGE at AndroidManifest.xml:49:5-108 duplicated with element declared at AndroidManifest.xml:48:5-81 /home/development/cordova/appname/platforms/android/app/src/main/AndroidManifest.xml Error: Validation failed, exiting

FAILURE: Build failed with an exception.

AndroidManifest.xml contains the following permissions:

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:maxSdkVersion="18" android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

The first permission was added by another plugin, cordova-plugin-file, the second permission was added by cordova-plugin-ironsource-ads. Commenting out the any permisions in the plugin.xml (in the plugin folder) and removing it from AndroidManifest.xml solves the issue, but I hope it can be avoided in the following versions.

By the way, when do you think it is going to be ready the banner?

charlesbodman commented 5 years ago

I'll take a look at fixing this in future versions.

I haven't had the time to work on the banners lately. I'll will do my best to release an update this month.

DennisNicolas commented 5 years ago

Same issue here. Is the 'android:maxSdkVersion="18"'-part necessary in plugin's plugin.xml?