Skip to content

No static method toDuration(ILkotlin/time/DurationUnit;)J in class Lkotlin/time/DurationKt; or its super classes #7527

@ShizeZhang

Description

@ShizeZhang

When using Firebase Sessions SDK in an Android project, the app crashes at runtime with a NoSuchMethodError related to Kotlin’s toDuration method. The error occurs when calling RemoteSettings.getSessionRestartTimeout().

Caused by java.lang.NoSuchMethodError: No static method toDuration(ILkotlin/time/DurationUnit;)J
in class Lkotlin/time/DurationKt; or its super classes
(declaration of 'kotlin.time.DurationKt' appears in /data/app/com.android.cura.osh-5lQNIm1y-WUUEexBAHlHNw==/base.apk)
at com.google.firebase.sessions.settings.RemoteSettings.getSessionRestartTimeout-FghU774(RemoteSettings.kt:51)
at com.google.firebase.sessions.settings.SessionsSettings.getSessionRestartTimeout-UwyO8pc(SessionsSettings.kt:121)
at com.google.firebase.sessions.SessionLifecycleService$MessageHandler.isSessionRestart(SessionLifecycleService.kt:178)
at com.google.firebase.sessions.SessionLifecycleService$MessageHandler.handleForegrounding(SessionLifecycleService.kt:101)
at com.google.firebase.sessions.SessionLifecycleService$MessageHandler.handleMessage(SessionLifecycleService.kt:80)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.os.HandlerThread.run(HandlerThread.java:67)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions