mapbox / mapbox/mapbox-maps-android

Incorrect number of expressions within toString Expression: expected 1, but 0 was found

Open
#2,378 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug :beetle:
Dominant language
Kotlin
Stars
578
Forks
161
PR merge metrics
No merged PRs in 30d

Description

Error:
Incorrect number of expressions within toString Expression: expected 1, but 0 was found.
Inspection info: Incorrect number of arguments for this Expression. Issue id: IncorrectNumberOfArgumentsInExpression Vendor: Mapbox Identifier: com.mapbox.maps:style-lint

Release build is not built.
Debug build is built, but the cluster is not displayed.
Code from example https://github.com/mapbox/mapbox-maps-android/blob/main/app/src/main/java/com/mapbox/maps/testapp/examples/CircleLayerClusteringActivity.kt

mapboxVersion "11.3.0","11.3.1", "11.4.0-rc.2"
gradle version: gradle-8.7, gradle-8.4

Please fix or provide a workaround
textField(Expression.toString(get("point_count"))) not worked too

Code:
```
textField(
format {
formatSection(
toString {
get {
literal("point_count")
}
}
)
}
)

```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with app/src/main/java/com/mapbox/maps/testapp/examples/CircleLayerClusteringActivity.kt and the shown Expression.toString and formatSection usage. Reproduce the style-lint IncorrectNumberOfArgumentsInExpression error across the listed Mapbox versions and build modes, then verify that the release build completes and the debug build displays the cluster.

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
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.