I am trying to import caldav4j library (caldav4j-0.7.jar) into my android studio project. I have the following two lines in my build.gradle file.
compile 'org.mnode.ical4j:ical4j:1.0.6'
compile files('libs/caldav4j-0.7.jar')
I am seeing multiple dex files defined error due to ical4j library because caldav4j-0.7.jar also has ical4j library defined as a maven dependency.
<dependency>
<groupId>net.fortuna.ical4j</groupId>
<artifactId>ical4j</artifactId>
<!--version>1.0-rc1-SNAPSHOT</version--><!-- patched on localhost-->
<version>1.0</version>
</dependency>
If I try to not to import ical4j separately by removing the first line,
compile 'org.mnode.ical4j:ical4j:1.0.6'
then I don't have access to ical4j package at all.. What I want to achieve is being able to import any classes from ical4j package. Is it normal for a maven project to not expose its dependencies' packages? Then how am I supposed to use ical4j inside my project? All import statements for ical4j library fails if I remove that line from build.gradle.
import net.fortuna.ical4j.model.Component;
import net.fortuna.ical4j.model.ComponentList;
import net.fortuna.ical4j.model.component.VEvent;
In short:
I want to import ical4j library but,
It gives me multiple dex files defined error if I separately add a line to build.gradle because of the conflicts with the internal dependency defined in caldav4j.jar.
If I remove that line, I don't have access to ical4j library at all because caldav4j.jar does not expose its dependencies..
Thanks for your help in advance :)