pombreda / maven-android-plugin

Automatically exported from code.google.com/p/maven-android-plugin
0 stars 0 forks source link

Support for producing multiple DEX files #280

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. build a DEX file with a lots of jars as dependencies

The problem is described here:
http://code.google.com/p/android/issues/detail?id=7147
in short, DX only supports 65536 methods and will fail on large projects.

The workaround is described here:
http://android-developers.blogspot.com/2011/07/custom-class-loading-in-dalvik.ht
ml

The workaround is to simply generate multiple dex files and then load them in 
runtime. Therefore, it would be great if android-maven-plugin could be 
configured to generate multiple dex files. The configuration can be made very 
simple, such as:
<secondarydexes>
  <dex><name>jetty</name><includes><include>org.mortbay.jetty</includes></dex>
  <dex>...</dex>
</secondarydexes>
The plugin would then:
1. generate all secondary dexes, with all classes in given package and 
subpackages, and put them named as $NAME.dx into the assets/ directory.
2. generate primary dx file, without classes which went to a secondary dex file.
3. package

Thanks!

Original issue reported on code.google.com by martin.v...@gmail.com on 21 May 2012 at 11:08

GoogleCodeExporter commented 9 years ago
Good idea. That would be a great addition! Are you working on a pull request 
with the implementation?

Original comment by mosa...@gmail.com on 11 Jun 2012 at 6:24

GoogleCodeExporter commented 9 years ago
Any update on this Issue? on how to work around it?
Im having trouble with this issue when I want to add 5 dependencies:
androidannotations, robospice, gson, com.google.api-client, 
google-api-client-android2.
The api-client from google depend on alot of libs. Is it possible to workaround 
it with proguard striping out unused methodes and classes?

Original comment by dylan.dr...@gmail.com on 21 Jan 2013 at 12:28

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Starting from 5 months ago, there is --multi-dex options on dx. I haven't tried 
it but it might worth to look. Have this plugin implemented? It would be great 
if it is.

Original comment by mail.dieend@gmail.com on 2 Feb 2014 at 9:36

GoogleCodeExporter commented 9 years ago
Please update the android:dex parameter to include the ability to use the 
--multi-dex option.

Original comment by dl...@gmacsoftware.com on 18 Mar 2014 at 4:26

GoogleCodeExporter commented 9 years ago
@dlock got a pull request to provide?

Original comment by william....@xandar.com.au on 18 Mar 2014 at 10:06

GoogleCodeExporter commented 9 years ago
i met the problem too.I hope the plugin will support this feature

Original comment by com.aimo...@gmail.com on 28 Apr 2014 at 5:32

GoogleCodeExporter commented 9 years ago
We are no longer using the issue tracking system on Google Code. Please refile 
this issue on https://github.com/jayway/maven-android-plugin/issues if you 
still have this problem with the latest release of the Android Maven Plugin

Original comment by mosa...@gmail.com on 19 May 2014 at 4:18