0

尝试为 Tango 创建一个使用 Unity 中的 Mapbox-sdk 的应用程序。目标是可视化结合增强现实的 3D 模型。在 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。

有谁知道如何解决它?

4

1 回答 1

2

导入 Tango 和 Mapbox 包后存在一些冲突。

为了解决它们,您应该在位于(避免合并清单冲突)中添加tools:node="merge"和并从同一文件夹中删除重复的库(Mapbox 资产中包含更新版本)。xmlns:tools="http://schemas.android.com/tools"AndroidManifest.xmlAssets>Plugins>Androidsupport-v4-23.4.0.aar

还要记住配置Build SettingsFile>Build Settings):

  • 使用Android选定的Switch Platform按钮
  • 点击Player Settings按钮
    • Package Name为您的 Android 应用设置一个
    • 设置Minimum API level17(Tango 需要它)

截屏:

Unity Mapbox Tango 设置

使用该设置,单击后Build & Run.apk正确生成,如果您连接了设备,您应该会看到应用程序在其上运行。

于 2017-06-13T14:36:14.487 回答