android studio - Excluding multiple transitive dependencies from all configurations -
i facing problem develop android project in android studio.
i using multiple *.jar extension files libraries project. but, have common classes between them, is, classes same class name , same package name. *.jar extension files are: rt.jar , tools.jar. "rt.jar" file obtained openjdk6 jre binary file debian os (x86). "tools.jar" file obtained beads library file, is, obtained "beads.zip" file, , "beads.zip" file available at: http://www.beadsproject.net/. developing new beads-based android project in android studio. way, need javasound implementation android os, because beads library needs javasound implementation. so, wanted use javart openjdk in beads-based android project in android studio, found problem of redundant *.class extension files in project libraries "rt.jar" , "tools.jar".
by way, need exclude redundant *.class extension files in "app execution process, in debug mode" (the respective button called: run 'app', in android studio), or in "apk building process", gradle tool use, is, in "classes.dex" file creation/manipulation.
i searched web, , found information in stackoverflow.com website... then, used "multidexenabled true" in "defaultconfig" definition fix previous problems.
so, knew use "configurations.compile.transitive = false" try resolve problem, didn't work. way, tried use of:
configurations { all*.exclude group: 'sun', module: 'sun.applet' all*.exclude group: 'sun', module: 'sun.tools.jar' }
, or
configurations { all*.exclude group: 'sun', module: 'sun.applet' } configurations { all*.exclude group: 'sun', module: 'sun.tools.jar' }
, example, didn't work, neither.
and tried:
dependencies { compile files('lib/tools.jar') { exclude group: 'sun', module: 'sun.applet' exclude group: 'sun', module: 'sun.tools.jar' } }
, didn't work, neither.
i don't know if these statements useful exclude redundant *.class extension java files in apk building process, think aren't.
the link of web page cited in question is:
https://discuss.gradle.org/t/how-can-i-exclude-all-transitive-dependencies/6875
.
thanks help.
the correct format exclude configurations is:
configurations { compile.exclude group: 'xml-apis', module: 'xmlparserapis' compile.exclude group: 'org.slf4j', module: 'slf4j-simple' }
Comments
Post a Comment