如何在 Android Studio 中将 sceneform.asset() 与 build.gradle.kts 一起使用?

问题描述 投票:0回答:1

如何在 Android Studio 中通过 build.gradle.kts 使用 sceneform.asset()

它抛出异常:未解析的参考:sceneform

与 build.gradle (groovy) 完美配合

android android-studio augmented-reality sceneform
1个回答
0
投票

需要使用旧的方式提供sceneform插件。只需将 classpath("com.google.ar.sceneform:plugin:1.17.1") 添加到您的项目 build.gradle.kts

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("com.google.ar.sceneform:plugin:1.17.1")
    }

}
plugins {
    id("com.android.application") version "8.2.0" apply false
    id("org.jetbrains.kotlin.android") version "1.9.20" apply false
    id("com.google.devtools.ksp") version "1.9.20-1.0.14" apply false
}
© www.soinside.com 2019 - 2024. All rights reserved.