Mahdi-Malv
Mahdi-Malv

Reputation: 19250

Generate desugared library for B4A

I'm making an Android library for B4A framework.
Here's the situation:

Using my aar file in the B4A results to the following error:

Uncaught translation error: com.android.dx.cf.code.SimException:
  invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
...

The solution of the official forum is to desugar the Jar of the library using Bazel's desugar tool, but it seems it leads to Expected a load for ... which is a different error and not my question.

My question:
Is it possible to generate desugared aar library (compatible with Java7 and no lambda) using Android Studio, for these cases?

I know that d8 does the desugaring, but it's output is .dex files and not .jar file.

What I've tried:
Solution said in the Android's Using Java 8 Feature did not help because it does not produce compatible jar and the error still occurs.

Upvotes: 3

Views: 218

Answers (0)

Related Questions