eclipse-archived/ceylon

Maven + Android build problems: Field name cannot be represented in dex format

Opened this issue · 0 comments

msx80 commented

Hi, i'm trying to build an Android project that's made of java and ceylon code.
The ceylon module depends on a java maven project like this:

shared import maven:org.github.msx80.omicron:"omicron-api" "0.0.1";

And in turn is exported as maven module, thanks to his own pom.xml. The main gradle android project import both modules to build the final apk. It all works reasonably good, except for this error during DEX building:

com.android.tools.r8.utils.AbortException: Error: Field name 'org$github$msx80$omicron:omicron-api' cannot be represented in dex format.

Looking at it, it seems like it was generated to make some kind of runtime dependency descriptor. I think the problem is either in the semicolon or in the hypen in the syntetic name (dollar sign should be good).

The field is defined either in $module_.class or $package_.class. I also noticed that if i remove this two classes from the jar (brutally deleting them), the build works perfecly (ie, they're not used for regular code, perhaps for the metamodel or something?)

So is there a way to either generate them with a different syntetic name schema, or not generate them at all or something?

Thanks