如何在 Android Studio 中通过 build.gradle.kts 使用 sceneform.asset()
它抛出异常:未解析的参考:sceneform
与 build.gradle (groovy) 完美配合
需要使用旧的方式提供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
}