【问题标题】:Build not running after Import Sceneform asset and model not displayed in Viewer导入 Sceneform 资产后构建未运行,查看器中未显示模型
【发布时间】:2020-10-01 13:38:53
【问题描述】:

我正在使用带有sceneform 1.15.0的android studio 4.0.1,在单击导入sceneform资产并单击.obj文件窗口中的完成后,没有任何反应,查看器显示没有3d模型,并且构建没有不跑。我已经尝试了有关堆栈溢出和 developer.android 应用程序和项目 Gradle 上的所有头文件的所有修复,但没有用。已安装 Google Sceneform Tools 插件。

【问题讨论】:

    标签: android android-studio augmented-reality sceneform


    【解决方案1】:

    我遇到了同样的问题,对我来说最好的解决方案是使用 GLB/GLTF 文件。(我使用这个导入器 https://www.npmjs.com/package/obj2gltf,结果很好)

    这里有一些选项: 尝试使用 Android Studio 3.5。如果 Sceneform Tools 插件也不起作用,请像这样在 build.gradle 中设置 3d 模型

    sceneform.asset('sampledata/chair/model.obj',
            'default',
            'sampledata/chair/model.sfa',
            'src/main/assets/chair')
    

    如果这不起作用,请使用此工具:https://github.com/gdamoreira/google-ar-asset-converter

    【讨论】:

      猜你喜欢
      • 2019-11-21
      • 1970-01-01
      • 1970-01-01
      • 2021-10-03
      • 2019-09-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多