Error in dexExtension

I am using Retrofit Library and okhttp;

Its Shows Build Successful but then :-

Its Shows Error in Line:161 and line 626;

mintty_aoFtC3viI2

1 Like

One or both libraries is using Java 8 lambdas (that’s the error about invoke dynamic). Dex does not support Java 8 constructs. There is a separate tool d8, that rewrites Java 8 bytecode to Java 7 that Dex can understand. You’ll probably want to run d8 manually on those libraries to get something you can use. Just be aware that the code may not run on older devices.

2 Likes

@ewpatton
I was getting same error.

Which tool are you saying about?? I searched on google but not found any intresting topics.

1 Like

Maybe this one?
https://www.google.com/url?sa=t&source=web&rct=j&url=https://developer.android.com/studio/command-line/d8&ved=2ahUKEwjQt7qVhLPxAhUgILcAHSKrAPoQFjAAegQIAxAC&usg=AOvVaw15VJ6Y_Pv00Hh1Bv-m64x5

1 Like

There shouldn't be these problems in the new Rush.

Have you managed to create an extension using okhttp or retrofit?

If you are getting same invoke dynamic error then first desugar jar with d8.