mapbox / mapbox/mapbox-maps-android
mapView.snapshot()com.mapbox.maps.extension.style.layers.Layer.bindTo com.mapbox.maps.MapboxStyleException - Add layer failed: Failed to set `line-gradient` property for `layer-id` layer. Error: Expected at least 4 arguments, but found only 2.
Open
Nobody has claimed this yet.
auto-triaged
bug :beetle:
needs info
- Dominant language
- Kotlin
- Stars
- 578
- Forks
- 161
- PR merge metrics
- No merged PRs in 30d
Description
Environment
- Android OS version: android14
- Devices affected:Galaxy S23 Ultra、Galaxy S22
- Maps SDK Version:11.5.1
Observed behavior and steps to reproduce
com.mapbox.maps.extension.style.layers.Layer.bindTo com.mapbox.maps.MapboxStyleException - Add layer failed: Failed to set line-gradient property for layer-id layer. Error: Expected at least 4 arguments, but found only 2.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure at mapView.snapshot() using Maps SDK 11.5.1 on Android 14, then inspect the Layer.bindTo path and the line-gradient setup referenced in the exception. Done means the layer can be added and the snapshot completes without the MapboxStyleException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100