在 Android Studio 3.6 中使用 Import Sceneform Asset 导入 FBX 时出错 [英] Error while importing FBX with Import Sceneform Asset in Android Studio 3.6

查看:38
本文介绍了在 Android Studio 3.6 中使用 Import Sceneform Asset 导入 FBX 时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用一个 Sceneform android sdk 动画示例项目,并尝试导入我自己的 FBX 进行测试.我将我的 fbx 添加到 sampledata/models 并单击 Import Sceneform Asset.我收到一个错误...新的导入规则导致 Gradle 构建失败.您想恢复更改吗?"

Im using a sceneform android sdk animation example project and am trying to import my own FBX for test. I add my fbx to sampledata/models and click on Import Sceneform Asset. Im getting an error ... "Gradle build failed with new import rules. Would you like to revert the changes?"

在事件日志窗口中我得到错误:java.lang.RuntimeException:java.lang.NoSuchMethodError:com.android.tools.idea.templates.recipe.RecipeExecutor.append(Ljava/io/File;Ljava/io/File;)V

In the event log window I get Error: java.lang.RuntimeException: java.lang.NoSuchMethodError: com.android.tools.idea.templates.recipe.RecipeExecutor.append(Ljava/io/File;Ljava/io/File;)V

我使用的是 Android Studio 3.6摇篮 3.6.0场景表单插件 1.15

Im using Android Studio 3.6 Gradle 3.6.0 sceneform plugin 1.15

欢迎任何解决此问题的建议

Any suggestion how to fix this would be welcomed

推荐答案

我遇到了这个问题,我尝试手动添加资产并成功.

I had this problem and i tried adding the asset manually and it worked.

例如,我使用了名为 andy_dance.fbx 的 obj

for example, I used the obj called andy_dance.fbx

所以我所做的是在 Gradle 构建中添加它

so what I did was add this in the Gradle build

sceneform.asset('sampledata/models/andy_dance.fbx',
    'default',
    'sampledata/models/andy_dance.sfa',
    'src/main/assets/andy_dance',
    ['sampledata/models/andy_dance.fbx'])

运行或构建您的应用程序,希望它能够运行

run or build your app and hopefully, it'll work

这篇关于在 Android Studio 3.6 中使用 Import Sceneform Asset 导入 FBX 时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆