java.util.concurrent.CompletableFuture on Android 5.0

Viewed 125

I have a package built for Java 8 using java.time.{Clock,Instant} and java.util.concurrent.CompletableFuture. I am trying to find a way to run it on Android 5.0 with minor modifications, by using desugaring as mentioned in https://developer.android.com/studio/write/java8-support-table, but it's failing with:

Failed resolution of: Ljava/util/concurrent/CompletableFuture;

I tried including the following in gradle.build:

implementation 'net.sourceforge.streamsupport:android-retrofuture:1.7.4'

but it's still not working, it seems related to the fact that the package names are java9.* instead of java.*.

Is there a convenient way to make my package work on Android 5.0 without rewriting it to not use these APIs?

0 Answers
Related