Skip to content

[Bug]: Task :rnmapbox_maps:compileDebugKotlin FAILED #4097

@dav1rm

Description

@dav1rm

I created a react native project with version 0.78, installed @rnmapbox/maps version 10.2.7 and receive the error below when try to compile android. Ios works fine.

I checked the documentation and saw something about use mapbox 11+ for new react native architecture, but I can't find more detailed information about how to use that.

Error:

Task :rnmapbox_maps:compileDebugKotlin FAILED

[Incubating] Problems report is available at: file:///Users/davi/workspace/mapboxApp/android/build/reports/problems/problems-report.html

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.12/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
93 actionable tasks: 83 executed, 10 up-to-date

info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor

e: file:///Users/davi/workspace/mapboxApp/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/modules/RNMBXModule.kt:16:34 Unresolved reference 'buildReadableMap'.
e: file:///Users/davi/workspace/mapboxApp/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/modules/RNMBXModule.kt:176:101 Unresolved reference 'buildReadableMap'.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':rnmapbox_maps: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.
Get more help at https://help.gradle.org.

BUILD FAILED in 1m 10s
error Failed to install the app. Command failed with exit code 1: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
e: file:///Users/davi/workspace/mapboxApp/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/modules/RNMBXModule.kt:16:34 Unresolved reference 'buildReadableMap'.
e: file:///Users/davi/workspace/mapboxApp/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/modules/RNMBXModule.kt:176:101 Unresolved reference 'buildReadableMap'. FAILURE: Build failed with an exception. * What went wrong:
Execution failed for task ':rnmapbox_maps: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.
Get more help at https://help.gradle.org. BUILD FAILED in 1m 10s.
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.


Environment

  • Dev OS: macOS 13.6.5
  • @rnmapbox/maps version: ^10.2.7
  • React Native version: 0.78.0

Steps to reproduce

create a react native project using this command:

npx @react-native-community/cli@latest init mapboxApp --version 0.78.0

install @rnmapbox/maps following the instructions and try to compile on android

yarn android

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