Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add an “exclude module” rule to an entry in plugin.xml for Cordova

I'm stucking with this error trying to build my phonegap project

enter image description here As far I know this error because there is a library is set twice in the project. I check all my libraries and I found only one library causing this(found in one of my plugins)

 <framework src="com.android.support:design:23.4.0"/>

The thing is, can I set an exclude module rule in the plugin.xml file? I think I need to exclude com.android.supportv4

like image 622
Hazem Hagrass Avatar asked Nov 17 '25 07:11

Hazem Hagrass


1 Answers

Finally I resolved it, I had to create a build-extras.gradle file in my plugin containing the following lines:

configurations {
  all*.exclude group: 'com.android.support', module: 'support-v4'
  all*.exclude group: 'com.android.support', module: 'support-annotations'}

Then this gradle file need to imported in plugin.xml file using:

<framework src="build-extras.gradle" custom="true" type="gradleReference" />
like image 58
Hazem Hagrass Avatar answered Nov 19 '25 21:11

Hazem Hagrass



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!