使用Mapbox和Project Tango的Unity项目

时间:2017-06-13 12:22:06

标签: android unity3d project mapbox tango

尝试为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。

任何人都知道如何解决它?

1 个答案:

答案 0 :(得分:2)

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

要解决这些问题,您应在tools:node="merge"中的xmlns:tools="http://schemas.android.com/tools"中添加AndroidManifest.xmlAssets>Plugins>Android(避免合并清单冲突)并删除重复的support-v4-23.4.0.aar来自同一文件夹的库(Mapbox资产中包含较新的版本)。

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

  • 选中Android后按Switch Platform按钮
  • 点击Player Settings按钮
    • 为您的Android应用设置Package Name
    • Minimum API level设置为17(Tango需要它)

截图:

Unity Mapbox Tango Setup

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