Mapbox Implementation
Mapbox
Mapbox Version
10.19.0
React Native Version
0.76.9
Platform
Android
@rnmapbox/maps version
10.1.40
Standalone component to reproduce
import React from 'react';
import {
MapView,
ShapeSource,
LineLayer,
Camera,
} from '@rnmapbox/maps';
const aLine = {
type: 'LineString',
coordinates: [
[-74.00597, 40.71427],
[-74.00697, 40.71527],
],
};
class BugReportExample extends React.Component {
render() {
return (
<MapView style={{flex: 1}}>
<Camera centerCoordinate={[-74.00597, 40.71427]} zoomLevel={14} />
<ShapeSource id="idStreetLayer" shape={aLine}>
<LineLayer id="idStreetLayer" />
</ShapeSource>
</MapView>
);
}
}
Observed behavior and steps to reproduce
The v26 LifecycleCompat file uses newer lifecycle APIs not available in RN 0.76
Error: Unresolved reference: setViewTreeLifecycleOwner
The fix is to use the older ViewTreeLifecycleOwner.set() API and getLifecycle() method
Expected behavior
No response
Notes / preliminary analysis
Able to build Android with this patch
@rnmapbox+maps+10.1.40.patch
Additional links and references
No response
Mapbox Implementation
Mapbox
Mapbox Version
10.19.0
React Native Version
0.76.9
Platform
Android
@rnmapbox/mapsversion10.1.40
Standalone component to reproduce
Observed behavior and steps to reproduce
The v26 LifecycleCompat file uses newer lifecycle APIs not available in RN 0.76
Error: Unresolved reference: setViewTreeLifecycleOwner
The fix is to use the older ViewTreeLifecycleOwner.set() API and getLifecycle() method
Expected behavior
No response
Notes / preliminary analysis
Able to build Android with this patch
@rnmapbox+maps+10.1.40.patch
Additional links and references
No response