Error: "duplicate entry: android/support/v7/appcompat/R$anim.class" -


building app generates following error:

error:execution failed task ':app:transformclasseswithjarmergingfordebug'. > com.android.build.api.transform.transformexception: java.util.zip.zipexception: duplicate entry: android/support/v7/appcompat/r$anim.class 

i have cleaned , built project many times no avail. has following in gradle build:

compile 'com.android.support:appcompat-v7:23.3.0' 

it uses library via aar file. library project has above in gradle build.

could offer tip on how resolve this?

yup , face same problem few days ago

reason - as told "that library project has above in gradle build" system wont able understand dependency hi take (app's - compile 'com.android.support:appcompat-v7:23.3.0' or module project's - compile 'com.android.support:appcompat-v7:23.3.0' ) hi says have duplicate entry

how resolve -

step 1 - clean/build project. go build -> clean/build project.

step 2 - in terminal execute in root project folder ./gradlew clean*

step 3- have exclude group 1 dependency

compile('com.android.support:design:23.2.1') {     exclude group: 'com.android.support', module: 'support-v7' } 

step 4 - check out awsome answer https://stackoverflow.com/a/19022328/4741746

and answer work me -

i remove 1 dependency apps level gradle , put in module project level gradle , exclude support-v4 in anim class exist

  compile 'com.android.support:appcompat-v7:23.2.1'         compile('com.android.support:design:23.2.1') {             exclude group: 'com.android.support', module: 'support-v4'         } 

Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -