rnmapbox / maps

A Mapbox react native module for creating custom maps
MIT License
2.27k stars 849 forks source link

Cannot install mapbox in android for new arch in React Native version 76.0 #3666

Closed Gautham495 closed 1 week ago

Gautham495 commented 3 weeks ago

Environment

Steps to reproduce

Install the latest version of rnmapbox in RN 76.0 bare project and enable new arch in android.

Does not work in android but builds in ios.

ERROR:

file:///Users/z/z/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/utils/ViewTagResolver.kt:35:42 Type mismatch: inferred type is View? but View was expected 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.

mfazekas commented 2 weeks ago

@Gautham495 pls try https://github.com/rnmapbox/maps/releases/tag/v10.1.33-rc.0

Gautham495 commented 2 weeks ago

Thanks @mfazekas - Will try it out.

Manikandan-saminathan commented 2 weeks ago

@mfazekas when can expect the stable version

EmilJunker commented 2 weeks ago

I'm able to build and run my app on Android with RN 0.76 and the new architecture enabled if I use the latest pre-release https://github.com/rnmapbox/maps/releases/tag/v10.1.33-rc.1.

However, there seems to be a problem with the Mapbox.UserLocation component. The onUpdate only gets called once, it doesn't update the location when the user moves. I'm also seeing some error messages in the log. Not sure if all of them are related to Mapbox:

Mapbox [error] ViewTagResolver | view: null found with tag: 368 but it's either null or not the correct type

Error: Exception in HostFunction: Could not enqueue microtask because they are disabled in this runtime, js engine: hermes

If I disable the new architecture by setting newArchEnabled=false in gradle.properties, everything works fine.

mfazekas commented 1 week ago

10.1.33 is released so closing this

EmilJunker commented 1 week ago

@mfazekas Please reopen, the problem with the Mapbox.UserLocation component I mentioned above is still happening when using v10.1.33 with the new architecture enabled (but not when using it with the new architecture disabled). I also still see the same error message in the console:

Mapbox [error] ViewTagResolver | view: null found with tag: 368 but it's either null or not the correct type