Mapbox SDK breaks Unity build with Could not resolve all files for configuration ‘:launcher:releaseRuntimeClasspath’

When adding Unity mapbox sdk to blank project I am unable to build an apk of the project

I’ve tried following a few tutorials online/youtube but each time I add mapbox my builds start failing, trying to debug this I took it back to the beginning and tried the following:
If I create a blank project in unity version: 2022.3.39f1
Change platform to android
set minimum api to 33
scripting backend to ILC2PP
include ARM64
import the latest unity mapbox SDK version: 2.1.1 (trying to reduce clutter i import only Mapbox and third party assets)

Note: per one suggestion I saw I have also tried ticking the boxes for Custom Main Gradle Template & Custom Gradle Properties Template
then when I try to build the project I get the above error, it then tells me to check the console for more details

For completeness the logs are (having stripped out some values):

  • What went wrong:
    Execution failed for task ‘:launcher:checkReleaseDuplicateClasses’.

Could not resolve all files for configuration ‘:launcher:releaseRuntimeClasspath’.
Failed to transform support-v4-25.1.0-.aar (:support-v4-25.1.0:) to match attributes {artifactType=enumerated-runtime-classes, org.gradle.status=integration, org.gradle.usage=java-runtime}.
> Execution failed for JetifyTransform: /Users/adamjones/today/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/support-v4-25.1.0.aar.
> Failed to transform ‘/Users/adamjones/today/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/support-v4-25.1.0.aar’ using Jetifier. Reason: AmbiguousStringJetifierException, message: The given artifact contains a string literal with a package reference ‘android.support.v4’ that cannot be safely rewritten. Libraries using reflection such as annotation processors need to be updated manually to add support for androidx.. (Run with –stacktrace for more details.)
This is a known exception, and Jetifier won’t be able to jetify this library.
Suggestions:
– If you believe this library doesn’t need to be jetified (e.g., if it already supports AndroidX, or if it doesn’t use support libraries/AndroidX at all), add android.jetifier.ignorelist = {comma-separated list of regular expressions (or simply names) of the libraries that you don’t want to be jetified} to the gradle.properties file.
– If you believe this library needs to be jetified (e.g., if it uses old support libraries and breaks your app if it isn’t jetified), contact the library’s authors to update this library to support AndroidX and use the supported version once it is released.
If you need further help, please leave a comment at https://issuetracker.google.com/issues/140747218.

==============================================================================

2: Task failed with an exception.
java.lang.StackOverflowError (no error message)

Get more help at https://help.gradle.org

BUILD FAILED in 2s
WARNING:We recommend using a newer Android Gradle plugin to use compileSdk = 34

This Android Gradle plugin (7.4.2) was tested up to compileSdk = 33

This warning can be suppressed by adding
android.suppressUnsupportedCompileSdk=34
to this project’s gradle.properties

The build will continue, but you are strongly encouraged to update your project to
use a newer Android Gradle Plugin that has been tested with compileSdk = 34
Task :unityLibrary:preBuild UP-TO-DATE
Task :unityLibrary:preReleaseBuild UP-TO-DATE
Task :launcher:preBuild UP-TO-DATE
Task :unityLibrary:compileReleaseAidl NO-SOURCE
Task :launcher:preReleaseBuild UP-TO-DATE
Task :launcher:compileReleaseAidl NO-SOURCE
Task :launcher:generateReleaseBuildConfig UP-TO-DATE
Task :unityLibrary:mergeReleaseJniLibFolders UP-TO-DATE
Task :launcher:javaPreCompileRelease UP-TO-DATE
Task :unityLibrary:mergeReleaseNativeLibs UP-TO-DATE
Task :launcher:generateReleaseResValues UP-TO-DATE
Task :unityLibrary:stripReleaseDebugSymbols UP-TO-DATE
Task :launcher:createReleaseCompatibleScreenManifests UP-TO-DATE
Task :launcher:extractProguardFiles UP-TO-DATE
Task :launcher:mergeReleaseJniLibFolders UP-TO-DATE
Task :launcher:checkReleaseDuplicateClasses FAILED
Task :unityLibrary:copyReleaseJniLibsProjectAndLocalJars
11 actionable tasks: 2 executed, 9 up-to-date
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <8b08da1c605e437b9a4d35d57a5bb352>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <8b08da1c605e437b9a4d35d57a5bb352>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <8b08da1c605e437b9a4d35d57a5bb352>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action1[T] progress, System.String error) (at <8b08da1c605e437b9a4d35d57a5bb352>:0) UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, Unity.Android.Gradle.AndroidGradle androidGradle, System.String workingdir, System.String task, System.Action1[T] progress) (at <8b08da1c605e437b9a4d35d57a5bb352>:0)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, Unity.Android.Gradle.AndroidGradle androidGradle, System.String workingdir, System.String task, System.Action`1[T] progress) (at <8b08da1c605e437b9a4d35d57a5bb352>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <8b08da1c605e437b9a4d35d57a5bb352>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <8b08da1c605e437b9a4d35d57a5bb352>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:203)

Given how widely used the sdk is i find it hard to believe the issue isn’t something I have done wrong, but the indication there is duplicate classes is hard to believe when it is an empty project

has anyone had a similar issue or is able to better interpret the error / highlight what I have done wrong?

New contributor

Adam Jones is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật