Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

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

Open
msx80 opened this issue Aug 8, 2019 · 0 comments

Comments

@msx80
Copy link

msx80 commented Aug 8, 2019

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant