Skip to content

Compilation errors in Sentry Flutter due to Kotlin API incompatibilities [Execution failed for task ':sentry_flutter:compileReleaseKotlin'.] #2396

@Alex-esc1

Description

@Alex-esc1

THIS IS FIXED IN 8.10.1

Platform

Dart

Obfuscation

Enabled

Debug Info

Enabled

Doctor

[✓] Flutter (Channel stable, 3.24.3, on macOS 15.1 24B83 darwin-arm64, locale ru-FR)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.1)
[✓] VS Code (version 1.95.2)
[✓] Network resources

Version

8.10.0

Steps to Reproduce

e: file:///Users/alex/.pub-cache/hosted/pub.dev/sentry_flutter-8.10.0/android/src/main/kotlin/io/sentry/flutter/SentryFlutter.kt:68:50 Unresolved reference: uppercase
e: file:///Users/alex/.pub-cache/hosted/pub.dev/sentry_flutter-8.10.0/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt:177:55 Unresolved reference: toDuration
e: file:///Users/alex/.pub-cache/hosted/pub.dev/sentry_flutter-8.10.0/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt:177:66 This declaration needs opt-in. Its usage must be marked with '@kotlin.time.ExperimentalTime' or '@OptIn(kotlin.time.ExperimentalTime::class)'
e: file:///Users/alex/.pub-cache/hosted/pub.dev/sentry_flutter-8.10.0/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt:177:79 This declaration needs opt-in. Its usage must be marked with '@kotlin.time.ExperimentalTime' or '@OptIn(kotlin.time.ExperimentalTime::class)'

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':sentry_flutter:compileReleaseKotlin'.

A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
Compilation error. See log for more details

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 33s

Expected Result

The assembly worked perfectly, a couple of hours ago everything broke down

Actual Result

Build should be successful

Are you willing to submit a PR?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Done

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions