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

maplibre_user_icon_shadow has unresolved theme attributes error #1274

Closed
ssuffian opened this issue Jun 23, 2023 · 1 comment · Fixed by #1275
Closed

maplibre_user_icon_shadow has unresolved theme attributes error #1274

ssuffian opened this issue Jun 23, 2023 · 1 comment · Fixed by #1275

Comments

@ssuffian
Copy link

ssuffian commented Jun 23, 2023

We have a codebase that we use once a year, and now is the time where I am going through and updating all the references and such. I have a snippet of code that seemingly worked last year, but after bumping all of the versions it gives me a runtime error.

 val activateOptions = LocationComponentActivationOptions.Builder(requireContext(), it).build()
 map.locationComponent.activateLocationComponent(activateOptions)

This code is inside of a map.set_style(...) where it is the style.

I'm getting the following traceback:

drawable/maplibre_user_icon_shadow has unresolved theme attributes! Consider using Resources.getDrawable(int, Theme) or Context.getDrawable(int).

 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.LocationComponent.applyStyle(LocationComponent.java:496)
at com.mapbox.mapboxsdk.location.LocationComponent.activateLocationComponent(LocationComponent.java:255)

I'm using

implementation 'org.maplibre.gl:android-sdk:10.2.0'
implementation 'org.maplibre.gl:android-plugin-annotation-v9:1.0.0'

Any help would be much appreciated!

@louwers louwers transferred this issue from maplibre/maplibre-plugins-android Jun 24, 2023
louwers added a commit to louwers/maplibre-native that referenced this issue Jun 24, 2023
@louwers louwers mentioned this issue Jun 24, 2023
@louwers
Copy link
Collaborator

louwers commented Jun 24, 2023

@ssuffian Thanks for the report. I think I have identified the issue, it should be fixed in the next release.

If you are able to, maybe you can try out building the fix from #1275

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

Successfully merging a pull request may close this issue.

2 participants