Android Question DESUGAR with missing dependency

drgottjr

Well-Known Member
Licensed User
i'm trying to use a number of unfamiliar #AdditionalJar's in a b4a project. naturally, many, many
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
are thrown.

so, one by one, i desugar them, and the number of errors drops until i'm down to 1 jar
(in this case cose-java-x.x.x.jar. i tried many of the x.x.x versions, hoping for a different outcome.)

anyway, when i run the desugar script on cose-java, i get:
Exception in thread "main" java.lang.NoClassDefFoundError: com/upokecenter/cbor/CBORObject

i look at the cose-java jar, and, of course, reference to the com.upokecenter.cbor package is there.
i have that package (it already happened to be an #AdditionalJar in my project).

my question is: how to include it in the desugar process of another jar. is there a command line option?
i tried an additional --input= option, but that doesn't work.

is the only way to handle this to try to rebuild cose-java from source with cbor as a dependency? (and then desugar that result, if any).
i'm guessing i could do that from the java command line, yes? (my only experience compiling java is with SLC for my b4a libraries).
but since both are already built, it would be good if desugar could handle it.
 

JordiCP

Well-Known Member
Licensed User
With a similar syntax, but from the command-line, you could try to desugar the conflictive jar with THIS.
I used it for a different problem, but should work in the same manner or better for individual jars.
Perhaps the thrown error will be different and this will give additional clues about the problem. You can try
 
Upvote 0

drgottjr

Well-Known Member
Licensed User
jordi! com sempre, el millor. i had seen that post of yours but didn't make the connection. stupid, stupid drgottjr 🤬. i hope life is good in iceland.
 
Upvote 0

JordiCP

Well-Known Member
Licensed User
jordi! com sempre, el millor. i had seen that post of yours but didn't make the connection. stupid, stupid drgottjr 🤬. i hope life is good in iceland.
Hehe, that was just in summer, now I'm living the usual hard live in Spain (although I'm going to Morocco in 10 days, lol) :)

Did the alternative desugarer make any difference?
 
Upvote 0

drgottjr

Well-Known Member
Licensed User
oh, yeah - builds fine. now facing known issue with base45 (yes, 45). don't forget to post selfie of you climbing fence in melilla
 
Upvote 0
Top