【发布时间】:2018-05-24 12:41:26
【问题描述】:
我将 Mapbox SDK (1.4.2) 导入到我的 Unity 项目中,并希望为 Android 构建项目。我希望应用程序在 Mapbox 支持的最低 Android 版本上运行。根据Mapbox website,最低API版本为API 14(Android 4.0.0)。但是当我尝试构建项目时,它告诉我该库需要最低 API 24(Android 7.0.0)。但是,我已将项目设置为具有最低 API 16(Android 4.1)和最高安装的目标 API(Android 8.1),因此该项目可以在此范围内的每个 Android 版本上运行。
但是当我尝试将项目构建为 .apk 时,会出现错误,表明清单合并失败。
Image showing the error which occurs in Unity
两个Android manifest .xml文件如下:
/Users/user/Desktop/Project/Temp/StagingArea/android-libraries/com.mapbox.android.unity-debug/AndroidManifest.xml
(Image) Link to the content of the AndroidManifest.xml file
/Users/user/Desktop/Project/Temp/StagingArea/AndroidManifest-main.xml
(Image) Link to the content of the AndroidManifest-main.xml file
我不知道该怎么办。在 AndroidManifest.xml 文件中,它说最低 API 版本是 24,尽管我将 Unity 中的最低 API 版本设置为 API 16 (Another image showing that I set the minimum API version to 16 in Unity)。我还尝试更改 AndroidManifest.xml 文件中的最低 API 版本,但在每次构建后,它又是 API 24。提前致谢!
【问题讨论】: