question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make compatible with Kotlin 1.5

See original GitHub issue

The versions 0.1.0 and 0.1.1 are incompatible with Kotlin 1.5.0 due to the changes in the experimental Duration inline value class there, which is widely used in kotlinx-datetime.

When using these versions with Kotlin 1.5, users can observe the following stack traces:

kotlin.time.DurationKt.getNanoseconds(J)D
java.lang.NoSuchMethodError: kotlin.time.DurationKt.getNanoseconds(J)D
	at kotlinx.datetime.DateTimeUnit$TimeBased.<init>(DateTimeUnit.kt:54)
	at kotlinx.datetime.DateTimeUnit.<clinit>(DateTimeUnit.kt:108)

or

java.lang.NoSuchMethodError: ‘kotlinx.datetime.Instant kotlinx.datetime.Instant.plus-LRDsOJo(long)’

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ilya-gcommented, Apr 27, 2021

The version 0.2.0 compatible with Kotlin 1.5 is available in maven central. Please update your dependencies if you used test builds from teamcity, as they will be cleaned up soon.

1reaction
hfhbdcommented, Apr 20, 2021

@only-kuban The link does not work with your browser, but with Gradle.

// build.gradle.kts
repositories {
    maven(url = "https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(KotlinTools_KotlinxDatetime_Build_All),status:success,branch:kotlin-1-5,pinned:true/artifacts/content/maven/")
}
dependencies {
    implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.2.0-dev-303")
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Compatibility guide for Kotlin 1.5
Compatibility guide for Kotlin 1.5 ... Keeping the Language Modern and Comfortable Updates are among the fundamental principles in Kotlin Language ...
Read more >
Jetpack Compose on Kotlin 1.5.0 - Stack Overflow
This version (1.0.0-beta07) of the Compose Compiler requires Kotlin version 1.4.32 but you appear to be using Kotlin version 1.5 ...
Read more >
Kotlin 1.5.20 Released! - The JetBrains Blog
Hi. Kotlin 1.5.20 makes compilation string concatenation to dynamic invocations the default. Previously it was Experimental. You can read about ...
Read more >
Compose to Kotlin Compatibility Map - Android Developers
Pre-release Kotlin Compatibility ; 1.1.0-alpha05, 1.5.31 ; 1.0.5, 1.5.31 ; 1.0.4, 1.5.31 ; 1.1.0-alpha04, 1.5.30.
Read more >
How has Kotlin/Native 1.5.20 improved compiler bug fixes?
A lot of significant changes have been made in Kotlin 1.5.20. However, an essential bug fix is made that affects compatibility.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found