【发布时间】:2020-05-29 06:20:59
【问题描述】:
我正在开展一个项目,该项目将在一个片段中包含一个 3D 模型查看器。为了做到这一点,我决定使用sceneform。
我将sceneform插件下载到Adnroid studio,从Github下载并解压sdk,并将libsceneform_runtime_schemas库复制到我的项目中。我已添加到我的 sceneform buil.gradle 文件行
implementation files("../libs/libsceneform_runtime_schemas.jar")
但这会导致错误:
Program type already present: com.google.ar.schemas.lull.AabbDef
值得注意的是,这是该路径下jar中的第一个文件-这可能意味着会有更多的冲突。
如果我尝试不实现这个库,那么我会得到一个错误:
error: package com.google.ar.schemas.sceneform does not exist
我在 sceneform gradle 中使用 ar:core:1.17.0 和 minSdkVersion 24。
我已经清理并重建了项目,使缓存无效/重新启动,并添加了 multiDexEnabled-尽管我不确定我是否正确地做。
通过使用gradlew sceneform:dependencies,我没有找到提到的文件。
我不知道如何继续前进,非常感谢任何帮助。如果我可以提供更多信息,请告诉我。
编辑 1: 我也尝试过使用
implementation files("../libs/libsceneform_runtime_schemas.jar"){
exclude ...
}
但我无法让它工作。我想知道这是否可以成为我的解决方案。
另外,既然它已经存在,为什么还要尝试实现这个类?不应该对此进行某种检查吗?
【问题讨论】:
标签: android maven gradle 3d augmented-reality