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

drawable/maplibre_user_icon_shadow has unresolved theme attributes #66

Open
superBleep opened this issue May 3, 2024 · 3 comments
Open

Comments

@superBleep
Copy link

Runtime exception thrown when adding user location blip on map, crashes the VM I'm using.

java.lang.RuntimeException
at android.content.res.Resources.getDrawable(Resources.java:908)
at com.mapbox.mapboxsdk.utils.BitmapUtils.getDrawableFromRes(BitmapUtils.java:183)
at com.mapbox.mapboxsdk.utils.BitmapUtils.getDrawableFromRes(BitmapUtils.java:169)
at com.mapbox.mapboxsdk.location.LayerBitmapProvider.generateShadowBitmap(LayerBitmapProvider.java:30)
at com.mapbox.mapboxsdk.location.LocationLayerController.styleBitmaps(LocationLayerController.java:162)
at com.mapbox.mapboxsdk.location.LocationLayerController.applyStyle(LocationLayerController.java:98)
at com.mapbox.mapboxsdk.location.LocationLayerController.initializeComponents(LocationLayerController.java:79)
at com.mapbox.mapboxsdk.location.LocationLayerController.<init>(LocationLayerController.java:72)
at com.mapbox.mapboxsdk.location.LocationComponent.initialize(LocationComponent.java:1092)
at com.mapbox.mapboxsdk.location.LocationComponent.activateLocationComponent(LocationComponent.java:250)

The code that triggers it:

MapLibre(
    styleUrl = "https://demotiles.maplibre.org/styles/osm-bright-gl-style/style.json",
    modifier = Modifier.fillMaxSize(),
    cameraPosition = cameraPosition,
    locationRequestProperties = LocationRequestProperties(
        interval = LOCATION_UPDATE_FREQ
    ),
    userLocation = userLocation
)

Seems to be similar to this issue on the main maplibre-native repo.

Using implementation("org.ramani-maps:ramani-maplibre:0.3.0")
VM: Pixel 7 API 33

@JonasVautherin
Copy link
Contributor

Did you try updating the maplibre transitive dependency? Maybe that just does it?

@superBleep
Copy link
Author

I’ve tried updating the dependency, but the fix is included in a prerelease that has changed some things in the library since the 10.2.0 release you’re using.

Most importantly, the package has been renamed from com.mapbox.mapboxsdk to org.maplibre.android, as detailed here.

@JonasVautherin
Copy link
Contributor

Got it, I'll try to update it ASAP. In the meantime, feel free to open a PR if you get to it first!

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

No branches or pull requests

2 participants