You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
10-29 14:19:44.546 8982-8982/com.mapbox.mapboxsdk.testapp E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.mapbox.mapboxsdk.testapp, PID: 8982
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.graphics.drawable.Drawable.setTintList(android.content.res.ColorStateList)' on a null object reference
at android.support.v4.graphics.drawable.DrawableCompat.setTintList(DrawableCompat.java:149)
at com.mapbox.mapboxsdk.utils.ColorUtils.setTintList(ColorUtils.java:114)
at com.mapbox.mapboxsdk.maps.UiSettings.setAttributionTintColor(UiSettings.java:605)
at com.mapbox.mapboxsdk.maps.UiSettings.initialiseAttribution(UiSettings.java:227)
at com.mapbox.mapboxsdk.maps.UiSettings.initialise(UiSettings.java:86)
at com.mapbox.mapboxsdk.maps.MapboxMap.initialise(MapboxMap.java:96)
at com.mapbox.mapboxsdk.maps.MapView.initialiseMap(MapView.java:216)
at com.mapbox.mapboxsdk.maps.MapView.access$900(MapView.java:75)
at com.mapbox.mapboxsdk.maps.MapView$6.run(MapView.java:345)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:5737)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
Replacing FragmentActivity with AppCompatActivity works. But it was not evident when debugging it.
Configuration
Mapbox SDK versions: >= v6.6.1
The text was updated successfully, but these errors were encountered:
Just stumbled on it too. Fixed by replacing ImageViews by v7 AppCompatImageView in mapbox_mapview_internal.xml. I'll add the pull request when I have 2 seconds.
Steps to reproduce
FragmentActivity
and useMapView
in one of the Acitivities inMapboxSDKTestApp
.Expected behavior
Activity should not crash.
Actual behavior
Crashes currently because of
srcCompat
not giving drawable when accessing throughgetDrawable
in https://github.com/mapbox/mapbox-gl-native/blob/master/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/utils/ColorUtils.java#L114Replacing
FragmentActivity
withAppCompatActivity
works. But it was not evident when debugging it.Configuration
Mapbox SDK versions: >= v6.6.1
The text was updated successfully, but these errors were encountered: