Question Java
Closed this issue · 10 comments
anneso-duchene commented
DSteve595 commented
I think you have two options:
- Enable Java 8 desugaring by adding this to your build.gradle:
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
This will let you use Java 8 language features, like lambdas and method references.
- Instantiate an anonymous inner class (
new Function1() { ... }
) instead of a lambda.
I'd recommend option 1.
anneso-duchene commented
DSteve595 commented
Will try on a Java project and see what's up.
anneso-duchene commented
Maybe I need to enable Kotlin library for my project ?
DSteve595 commented
Are you able to use Kotlin types like Function1
?
anneso-duchene commented
DSteve595 commented
If that class can't be imported, it's likely because our library isn't sharing the dependency. Sorry about that. I'll check and fix that.
In the meantime, adding the Kotlin standard library as a dependency will temporarily fix it.
anneso-duchene commented
DSteve595 commented
Very glad to hear it! Will fix the dependency issue in an update.
DSteve595 commented
This should be fixed in version 1.2.1. Let me know if you still see any issues.