mapbox / mapbox/mapbox-maps-android

Migration from V10 to v11, bigger libs size

Open
#2,718 0 comments 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

Environment

  • Android OS version: All
  • Devices affected: All
  • Maps SDK Version: 11.21.1

Observed behavior and steps to reproduce

Hello,
While doing a migration of my app from Mapbox SDK v10 to v11 I was surprised by the new size of the raw file generated. From the diff of the previous release (with Mapbox v10) there is an increase of more than 16MB coming from libmapbox-maps.so and libmapbox-common.so. Here an example with x86 architecture:

Image

I properly excluding some plugin I'm not using, as explained on the APK size page, but didn't see any changes on the lib sizing.

implementation(libs.mapbox.android) {
        exclude("com.mapbox.plugin", "maps-lifecycle-ndk27")
        exclude("com.mapbox.plugin", "maps-indoorselector-ndk27")
        exclude("com.mapbox.plugin", "maps-overlay-ndk27")
        exclude("com.mapbox.plugin", "maps-lifecycle-lint-rules-ndk27")
        exclude("com.mapbox.plugin", "maps-annotation-ndk27")
    }

Is it normal the v11 SDK is much bigger than the v10? Is there any config to setup to avoid this size increase?

Thanks for your help!

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 the APK size page and the reported dependency exclusions, then compare the x86 sizes of libmapbox-maps.so and libmapbox-common.so between SDK v10 and v11.21.1 using the Kotlin configuration shown. Done means determining whether the increase is expected and identifying any supported configuration that avoids it, or documenting that none exists.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.