rnmapbox / maps

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

[Bug]: incompatiblity with fresco@3.3.0/3.4.0 #3650

Closed efstathiosntonas closed 1 month ago

efstathiosntonas commented 1 month ago

Mapbox Implementation

Mapbox

Mapbox Version

11.6.0

React Native Version

0.75.4

Platform

Android

@rnmapbox/maps version

10.1.31

Fresco@3.3.0 will probably land on rn@0.76 according to this PR: https://github.com/facebook/react-native/pull/46864

edit node_modules/react-native/gradle/libs.versions.toml -> set fresco = "3.3.0" -> build fails:

> Task :rnmapbox_maps:compileDebugKotlin
e: file:///Users/stathis/IdeaProjects/APP_NAME_mobile/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapView.kt:18:27 Unresolved reference: ViewTreeLifecycleOwner
e: file:///Users/stathis/IdeaProjects/APP_NAME_mobile/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapView.kt:119:30 Object is not abstract and does not implement abstract member public abstract val lifecycle: Lifecycle defined in com.rnmapbox.rnmbx.components.mapview.RNMBXLifeCycleOwner
e: file:///Users/stathis/IdeaProjects/APP_NAME_mobile/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapView.kt:134:17 'getLifecycle' overrides nothing
e: file:///Users/stathis/IdeaProjects/APP_NAME_mobile/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapView.kt:138:13 Unresolved reference: ViewTreeLifecycleOwner
e: file:///Users/stathis/IdeaProjects/APP_NAME_mobile/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/RNMBXStyleImport.kt:9:37 Unresolved reference: style
e: file:///Users/stathis/IdeaProjects/APP_NAME_mobile/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXLayer.kt:21:37 Unresolved reference: layer

> Task :rnmapbox_maps:compileDebugKotlin FAILED

downgrading fresco@3.2.0 builds fine.

remarks:

  1. I build rn on Android from source
  2. tried to clean gradle, same results
efstathiosntonas commented 1 month ago

Hey guys, not a big deal for now but we might face this in the future, this is just a "proactive" bug report.

efstathiosntonas commented 1 month ago

@mfazekas hi, this should not be closed, rn@0.76 is coming soon.

github-actions[bot] commented 1 month ago

No code example found in issue body - More info