Skip to content

[Bug]: Android compile error #136

Description

@SaxPlayer

Pubspec entry:

background_locator_2: ^2.0.6

Attempting to run either in debug or release mode on an Android simulator running Android API 35. App crashes and does not launch. Error shown in the console:

`Launching lib/main.dart on sdk gphone64 x86 64 in debug mode...
e: file:///Users/saxplayer/.pub-cache/hosted/pub.dev/background_locator_2-2.0.6/android/src/main/kotlin/yukams/app/background_locator_2/provider/LocationParserUtil.kt:21:20 Return type mismatch: expected 'java.util.HashMap<kotlin.Any, kotlin.Any>', actual 'kotlin.collections.HashMap<kotlin.String, it(kotlin.Comparable<*>? & java.io.Serializable?)>'.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':background_locator_2:compileDebugKotlin'.

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 27s
Error: Gradle task assembleDebug failed with exit code 1

Exited (1).`

Flutter doctor:

`Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.2, on macOS 14.6.1 23G93 darwin-x64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.2)
[✓] VS Code (version 1.93.0)
[✓] Connected device (5 available)
[✓] Network resources

• No issues found!`

Using Android NDK version 25.1.8937393

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions