can't be built.
And looks like there is still no official solution from Google yet.
One of the best-known not official solutions is to split project and libraries classes like the following:
- keep only main project's classes.dex file
- move libraries classes.dex to assets folder
- during application startup dynamically read lib's classes.dex from the assets folder
Of course it would be great to have an official solution to extend current DEX limit.
Or, at least, add to android gradle plugin well-known 'jar' task from 'java' plugin.
If it is be added, then it would really help to easy prevent packaging all library *.class files in the same classes.dex, simply by customizing 'jar' task:
configure(jar) { include 'classes.dex'
}