maplibre / maplibre-native

MapLibre Native - Interactive vector tile maps for iOS, Android and other platforms.
https://maplibre.org
BSD 2-Clause "Simplified" License
898 stars 274 forks source link

bitmaputil improvement #2485

Closed jDilshodbek closed 2 weeks ago

jDilshodbek commented 4 weeks ago

The Android studio logcat is showing this warning during development frequently while Using maplibre Android library: Drawable com.uznewmax.mytaxi:drawable/maplibre_user_icon_shadow has unresolved theme attributes! Consider using Resources.getDrawable(int, Theme) or Context.getDrawable(int). (Ask Gemini) java.lang.RuntimeException at android.content.res.Resources.getDrawable(Resources.java:959) at dev.b3nedikt.app_locale.AppLocaleResources.getDrawable(AppLocaleResources.kt:96) 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:497) at com.mapbox.mapboxsdk.location.LocationComponent.activateLocationComponent(LocationComponent.java:256) at uz.mytaxi.map.maplibre.MapLibreImpl.setMyLocationIndicator(MapLibreImpl.kt:525)

As a solution, removed and updated some deprecated class methods.

Platform: Android OS Version OS: Android 14 Device hardware : Xiaomi Redmi Note 13 Android skin: Harmony OS

jDilshodbek commented 3 weeks ago

Should I run it in terminal? it is saying make: *** No rule to make targetandroid-check'. Stop.` What lint tool is used to pass locally detect checks?

louwers commented 3 weeks ago

Yes it needs to be run in platform/android where the Makefile resides.

ktlint is used.

jDilshodbek commented 3 weeks ago

did android-check and pushed new commit, should work normal now