mapbox / mapbox/mapbox-unity-sdk

16KB Page Size Unsupported

Open
#1,986 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
784
Forks
231
PR merge metrics
No merged PRs in 30d

Description

When building an APK with V3.0.7, I still encounter issues with 16KB page size alignment.

I created an empty project with Unity Version 6000.0.71f1 and let Unity build for Android. The resulting build encounters no errors:

Image

Afterwards, I added the Mapbox package to the project as detailed in the installation description.

First, the build does not succeed due to Gradle issues:

`
What went wrong:

Execution failed for task ":launcher:mergeDebugNativeLibs".

A failure occurred while executing com.android.build.gradle.internal.tasks.MergeNativeLibsTask$MergeNativeLibsTaskWorkAction

2 files found with path "lib/arm64-v8a/libc++_shared.so" from inputs:

- PROJECTPATH/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/build/intermediates/library_jni/debug/copyDebugJniLibsProjectOnly/jni/arm64-v8a/libc++_shared.so

- GRADLEPATH/.gradle/caches/8.13/transforms/2e6a333e48c2db01e073a24617af2b10/transformed/jetified-common-ndk27-24.10.0/jni/arm64-v8a/libc++_shared.so

If you are using jniLibs and CMake IMPORTED targets, see

https://developer.android.com/r/tools/jniLibs-vs-imported-targets
`

If I tell Gradle to pick the first version it gets via the "packaging" attribute in the gradle launcher template, the build succeeds, but the resulting APK is not 16KB aligned:

Image

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

Reproduce the Android build with Unity 6000.0.71f1 and the Mapbox package, starting from the Gradle error for duplicate libc++_shared.so files. Inspect the Gradle launcher template and its packaging attribute, then verify that the resulting APK is 16KB aligned without the duplicate-library failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, csharp, unity
Domain
build-system, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.