New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does not support Kotlin 1.6.0 #1188
Comments
Hi. Any update on this issue? Kotlin 1.6.0 has been released to production and this crash happens, making it impossible to upgrade Kotlin... |
same thing. |
Set Koin logger to level Error, as a workaround for the time being
|
That worked. Thanks. |
Yes sorry, use this workaround for now. |
I remember another bug related to this |
For those creating their own |
Yes, exactly the same happened when Kotlin 1.5 was released: #1076 |
Workaround for Ktor:
|
This works ! Thanks ! |
my case, also get rid of manually set logger for now startKoin {
androidLogger(Level.ERROR)
//logger(object : Logger() {
// override fun log(level: Level, msg: MESSAGE) {
// Timber.tag("koin(di)").d(msg)
// }
//})
//...
} |
Hey guys, any news on this? Using KMM I couldn't find a way to fix this crash. Even creating an
Any help? |
const val KOIN = "3.1.4" |
@cikpis I got it working in KMM in two ways:
iOS:
Also in shared:
Then in the app module in Android, in MyApplication/BaseApplication:
|
Thanks @lotdrops, I'll give it a try and keep you posted. |
any release for kotlin 1.6.0? |
Koin 3.2.0 will bring Kotlin 1.6 |
* Updating Kotlin to 1.6.10 required updating some Compose dependencies to the next RC versions (which support a matching version of Kotlin) * Add support to use `ksp` for Moshi code-gen instead of using `kapt`. `kapt` will still be required as long as DataBinding is used in the project (see https://twitter.com/yigitboyar/status/1447408905240264704) * Workaround koin crash on launch caused by Kotlin 1.6.x update: InsertKoinIO/koin#1188 (comment) * Add additional unit test coverage in `:data` to bring coverage back up above 40% * Update other dependencies
* Updating Kotlin to 1.6.10 required updating some Compose dependencies to the next RC versions (which support a matching version of Kotlin) * Add support to use `ksp` for Moshi code-gen instead of using `kapt`. `kapt` will still be required as long as DataBinding is used in the project (see https://twitter.com/yigitboyar/status/1447408905240264704) * Workaround koin crash on launch caused by Kotlin 1.6.x update: InsertKoinIO/koin#1188 (comment) * Add additional unit test coverage in `:data` to bring coverage back up above 40% * Update other dependencies
Great news, but note that anyone who still targets SDK 29 won't be able to update to Koin 3.2.0: Play Store required all app updates to target SDK 30 back in November 2021, but if you're not using it to publish apps, you're stuck with this workaround (suggested earlier in this thread): startKoin {
androidLogger(Level.ERROR) // default Level.INFO
...
}
|
What prevents you from having Edit: Manifest merging rules clearly state that "attributes in the |
Koin 3.2 is updated for Kotlin 1.6.10 👍 |
@arnaudgiuliani great news! Do you guys know already when will it be released? |
Thanks this works for me. |
3.2.0-beta-1 still does not work for me with Kotlin 1.6.10 and the app gets crash and generates these errors for all module injections: |
That's weird, because I've updated to 3.2.0-beta-1 in several different projects, and all worked fine. Maybe check your other artifacts, for example, DBInspector is using Koin as well, and it's linked with 3.1.4 (we've had to temporarily exclude it from our project) |
This works for me! Thanks! |
if any one facing issue like: No static method toDouble-impl(JLjava/util/concurrent/TimeUnit;)D in class Lkotlin/time/Duration; or its super classes (declaration of 'kotlin.time.Duration' appears in so you need to change "androidLogger()" to androidLogger(if (BuildConfig.DEBUG) Level.ERROR else Level.NONE) koin = startKoin {
|
Describe the bug
Latest koin version produces
NoSuchMethodError
s at runtime when using kotlin 1.6.0-RCTo Reproduce
Steps to reproduce the behavior:
Expected behavior
The app is able to run without crashing.
Koin project used and used version (please complete the following information):
[e.g]:
koin version 3.1.2
, kotlin 1.6.0-RCThe surest way to get a runtime error is to call a deleted method toDouble() of kotlin.duration that was removed in 1.6.0 by using
Stacktrace:
Lesson: do not use experimental APIs
The text was updated successfully, but these errors were encountered: