尝试为Unity使用Mapbox-sdk创建一个应用程序。目标是将3D模型与augmentet现实相结合。尝试为Unity中使用Mapbox和Tango的项目构建apk时,会发生以下错误:
Error: Error while saving blame file, build will continue
Error: The prefix "tools" for attribute "tools:overrideLibrary" associated with an element type "uses-sdk" is not bound.
UnityEditor.HostView:OnGUI()
AndroidSDKToolsException: Unable to merge android manifests. See the Console for more details.
UnityEditor.Android.AndroidSDKTools.DetectErrorsAndWarnings (System.String logMessages, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommand (System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommand (System.String[] sdkToolCommand, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommand (System.String[] sdkToolCommand, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.MergeManifests (System.String target, System.String mainManifest, System.String[] libraryManifests, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit)
UnityEditor.Android.PostProcessor.Tasks.GenerateManifest.MergeManifests (UnityEditor.Android.PostProcessor.PostProcessorContext context, System.String targetManifest, System.String mainManifest)
UnityEditor.Android.PostProcessor.Tasks.GenerateManifest.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.HostView:OnGUI()
即使项目是空的"也会发生这些错误,我唯一要做的就是导入Mapbox和Unity。
任何人都知道如何解决它?
答案 0 :(得分:2)
导入Tango和Mapbox软件包后,存在一些冲突。
要解决这些问题,您应在tools:node="merge"
中的xmlns:tools="http://schemas.android.com/tools"
中添加AndroidManifest.xml
和Assets>Plugins>Android
(避免合并清单冲突)并删除重复的support-v4-23.4.0.aar
来自同一文件夹的库(Mapbox资产中包含较新的版本)。
还要记住配置Build Settings
(File>Build Settings
):
Android
后按Switch Platform
按钮Player Settings
按钮
Package Name
Minimum API level
设置为17
(Tango需要它)截图:
使用该设置,点击Build & Run
后,.apk
正确生成,如果您已连接设备,则应该会看到正在运行的应用程序。