Duplicate class javax.el.ArrayELResolver found in modules jsp-api-2.1-6.1.14.jar (org.mortbay.jetty:jsp-api-2.1:6.1.14) and jsp-api-2.1.jar (javax.servlet.jsp:jsp-api:2.1) Duplicate class javax.el.BeanELResolver found in modules jsp-api-2.1-6.1.14.jar (org.mortbay.jetty:jsp-api-2.1:6.1.14) and jsp-api-2.1.jar (javax.servlet.jsp:jsp-api:2.1) Duplicate class javax.el.BeanELResolver$BeanProperties found in modules jsp-api-2.1-6.1.14.jar (org.mortbay.jetty:jsp-api-2.1:6.1.14) and jsp-api-2.1.jar (javax.servlet.jsp:jsp-api:2.1) Duplicate class javax.el.BeanELResolver$BeanProperty found in modules jsp-api-2.1-6.1.14.jar (org.mortbay.jetty:jsp-api-2.1:6.1.14) and jsp-api-2.1.jar (javax.servlet.jsp:jsp-api:2.1)
build.gradle:
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
//The dependencies below are for a library i'm including after which i get the error
compile "org.bouncycastle:bcprov-jdk15on:1.54"
compile "org.apache.pdfbox:pdfbox:[2.0.15,)"
compile "org.mapdb:mapdb:3.0.4"
compile "com.google.guava:guava:19.0"
compile "com.carrotsearch:java-sizeof:0.0.5"
compile "org.apache.hadoop:hadoop-common:2.7.1"
compile "com.amazonaws:aws-java-sdk:1.11.19"
compile "org.apache.hadoop:hadoop-core:1.2.1"
compile "org.apache.lucene:lucene-analyzers-common:6.1.0"
compile "org.apache.poi:poi-scratchpad:3.15-beta1"
compile "org.apache.poi:poi:3.15-beta1"
compile "org.apache.poi:poi-ooxml:3.15-beta1"
I've read on other threads on stack overflow about using the exclude:group in your build.gradle it's just that i seem to be doing something wrong. Can someone please tell me (i) how to add the exlude statement to the fix the error above instead of giving some generic example (ii) how would i manually remove the modules causing the duplication? (i've tried by removing them from the gradle cache folder even deleted the .gradle folder but it keeps rebuilding it). Any suggestion would be appreciated