Multiple dex files in Android Studio? -
hi found error , last 2 days playing error did not run project. please 1 me. delete android support v4.jar main project not delete libraries project because have own dependencies , delete anotation jar. annotation jar, android support v4, , appcompact v4 using in external libraries project. still found issue. jar list
android-support-v7-recyclerview.jar androidanimations.jar androideasingfunctions-1.0.0.jar google-http-client-1.16.0-rc.jar google-play-services.jar gson-2.1.jar
and gradle file
buildscript { repositories { mavencentral() } dependencies { classpath 'com.android.tools.build:gradle:1.2+' } } apply plugin: 'android' repositories { mavencentral() } android { compilesdkversion 21 buildtoolsversion '21.0.1' defaultconfig { applicationid "com.iptikarpromotion" minsdkversion 9 targetsdkversion 21 versioncode 1 versionname "1.0" } buildtypes { release { minifyenabled true proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile filetree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:22.2.0' compile files('libs/android-support-v7-recyclerview.jar') compile files('libs/androidanimations.jar') compile files('libs/androideasingfunctions-1.0.0.jar') compile files('libs/google-http-client-1.16.0-rc.jar') compile files('libs/google-play-services.jar') compile files('libs/gson-2.1.jar') compile project(':libraries:imagesliderlibrary') compile project(':libraries:galleryviewlibrary') }
please see belopw error
com.android.dex.dexexception: multiple dex files define landroid/support/annotation/animres; @ com.android.dx.command.dexer.main.mergelibrarydexbuffers(main.java:454) @ com.android.dx.merge.dexmerger.readsortabletypes(dexmerger.java:596) @ com.android.dx.merge.dexmerger.mergedexes(dexmerger.java:171) @ com.android.dx.merge.dexmerger.merge(dexmerger.java:189) @ com.android.dx.merge.dexmerger.mergeclassdefs(dexmerger.java:535) @ com.android.dx.merge.dexmerger.getsortedtypes(dexmerger.java:554) @ com.android.dx.command.dexer.main.runmonodex(main.java:302) @ com.android.dx.command.dexer.main.run(main.java:245) @ com.android.dx.command.dexer.main.main(main.java:214) @ com.android.dx.command.main.main(main.java:106) error:execution failed task ':app:dexdebug'. > com.android.ide.common.process.processexception: org.gradle.process.internal.execexception: process 'command 'c:\program files\java\jdk1.7.0_79\bin\java.exe'' finished non-zero exit value 2
the class android/support/annotation/animres included twice in project, maybe in 2 different libraries. need find out , exclude 1 of them.
Comments
Post a Comment