首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >添加无法解析的sceneform 1.16时出错

添加无法解析的sceneform 1.16时出错
EN

Stack Overflow用户
提问于 2020-08-20 11:07:06
回答 1查看 261关注 0票数 0

我关注了:https://github.com/google-ar/sceneform-android-sdk

并添加了

代码语言:javascript
复制
Finally, add a reference to the Sceneform SDK to your app's build.gradle:
dependencies {
    api project(":sceneformux")
}

但是我得到了一个错误

代码语言:javascript
复制
Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve project :sceneformux.

我错过了什么吗。

在执行完这些步骤后,我也得到了以下不存在的错误。

代码语言:javascript
复制
import com.google.ar.sceneform.AnchorNode;
import com.google.ar.sceneform.rendering.ModelRenderable;
import com.google.ar.sceneform.ux.ArFragment;
import com.google.ar.sceneform.ux.BaseArFragment;
import com.google.ar.sceneform.ux.TransformableNode;
import com.google.ar.sceneform.math.Quaternion;
import com.google.ar.sceneform.math.Vector3;
EN

回答 1

Stack Overflow用户

发布于 2020-12-29 20:40:32

看起来你的Android Studio找不到sceneformux模块。

您可以将其添加到您的项目中,如您共享的链接中的步骤所述-特别是:

  1. 从Sceneform SDK发布页面下载sceneform-android-sdk-1.16.0.zip。
  2. 将sceneformsrc和sceneformux目录解压到项目的顶级目录中。生成的目录结构应类似于以下内容:

项目

+--应用

+-- build.gradle

+-- ...

+--场景格式sceneformsrc

+--场景

+-- build.gradle

+-- settings.gradle

+-- ...

  1. 修改项目的settings.gradle以包含场景形式项目: include ':app'

//添加以下行:

包含':sceneform‘

项目(‘:sceneform’).projectDir=new文件(‘sceneformsrc/sceneform’)

包含':sceneformux‘

项目(‘:sceneformux’).projectDir=new文件(‘sceneformux/ux’)

  1. 最后,将对Sceneform SDK的引用添加到应用程序的build.gradle: dependencies { api project(":sceneformux") }

假设你做了以上所有的事情,那么可能是Android studio没有同步到你复制到项目中的目录sceneformsrc和sceneformux。

你现在很可能已经解决了这个问题,但为了完整起见,我看到了类似的东西,虽然Android Studio中可能有更精确的同步选项来解决这个问题,但我发现退出Android Studio并重启它通常可以解决这类问题,在这种情况下也是如此。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63497718

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档