views:

76

answers:

1

How I can create apk application from two different dex file ? I did'nt find any way to link many dex files with the android tools.

+1  A: 

I am not certain that it is possible. Moreover, it should not be necessary -- I would think that there are perhaps other ways of solving whatever problem you have.

For example, if you are trying to make some reusable code, just turn that reusable code into a JAR and add that JAR to the other application's libs/ directory. You can see plenty of examples of this with the CWAC projects on my github page. All of those generate a JAR file (via the ant jar task) that can then be used by other Android applications.

CommonsWare
I actually use this solution. My problem is that the dex conversion process is very slow (my jar library contains thousands classes) and it occurs each time I compile my application in order to run it on the device. So, I want to know if it's possible de convert my library in dex file and just link this file at compile time.
Arutha
If your project uses thousands of classes, you may wish to consider whether it is appropriate for mobile platforms. Thousands of classes will mean many MB of compiled code, which will result in an application that consumes a lot of on-board flash plus a lot of RAM when executed. I would focus less on how to optimize the compilation process and more on how to eliminate the vast majority of the code you are trying to use.
CommonsWare
I totally agree with you but using this library is required by the specifications...
Arutha
Presumably you're not using everything in this library, so you could see if the provider has more modular JARs, or you could strip out the unrequired stuff yourself.
Christopher
Even if I reduce the library to a hundred of classes, it's still too long (30 sec.).
Arutha