问题
I have a very simple Android project set up that uses:
- Several custom Scala JARs that are going to perform some functionality for my app
- scala-library.jar version 2.9.1 final so the Scala jars can run
However, whenever I try to launch the app, I get errors saying that the scala-library cannot be Dexed because it is too large.
Googling shows that this is a problem, but I am unsure how to fix it. Some say Proguard is the answer, but I don't know how to do that.
I don't currently use Ant for any build management, just Eclipse tools.
Any help or tips?
回答1:
You should use ProGuard prior to dexing the standard library.
There is an sbt plugin for Scala Android projects available here: https://github.com/jberkel/android-plugin/
The Getting Started guide is quite detailed: https://github.com/jberkel/android-plugin/wiki/getting-started
This plugin automatically uses ProGuard.
If you want to use ProGuard manually yourself, check out: http://proguard.sourceforge.net/index.html#manual/usage.html
来源:https://stackoverflow.com/questions/11215718/using-scala-library-jar-in-an-android-project-throws-error-library-cannot-be-de