Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Gautham495 opened this issue Oct 25, 2024 · 6 comments
Closed

Comments

@Gautham495
Copy link

Environment

  • Dev OS: Mac M1 pro
  • @rnmapbox/maps version: [eg. 10.1.31]
  • React Native version: 76.0

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
Copy link
Contributor

@Gautham495
Copy link
Author

Thanks @mfazekas - Will try it out.

@Manikandan-saminathan
Copy link

@mfazekas when can expect the stable version

@EmilJunker
Copy link

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
Copy link
Contributor

mfazekas commented Nov 3, 2024

10.1.33 is released so closing this

@mfazekas mfazekas closed this as completed Nov 3, 2024
@EmilJunker
Copy link

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants