You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Android AR项目Gradle同步失败:无法解析sceneform依赖求助

依赖解析失败:com.gorisse.thomas.sceneform:sceneform:1.21.0及后续新增依赖问题

问题详情

  • 开发带AR功能的Android应用,依赖com.gorisse.thomas.sceneform:sceneform:1.21.0,之前运行正常,现在Gradle同步时无法解析该依赖。
  • 之前遇到同类问题,重启电脑就能解决,但这次没用;尝试删除.idea和.gradle文件夹后重新导入项目,问题依然存在。
  • 补充:新建项目并复制原项目所有文件后,无法解析的依赖变成三个,且不再包含sceneform。

报错信息

Failed to resolve: com.gorisse.thomas.sceneform:sceneform:1.21.0
Show in Project Structure dialog
Show Details
Affected Modules: app

项目build.gradle配置

plugins {
    id 'com.android.application'
    id 'org.jetbrains.kotlin.android'
}

android {
    compileSdk 33
    packagingOptions {
        resources {
        pickFirsts += ['META-INF/DEPENDENCIES']
        }
    }

    buildFeatures {
        viewBinding true
    }
    defaultConfig {
        applicationId "com.example.rocksterapp"
        minSdk 29
        targetSdk 33
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    androidResources {
        noCompress 'filamat', 'ktx'
    }
    namespace 'com.example.<appname>'
}

dependencies {
    implementation 'com.google.android.filament:filamat-android:1.21.1'
    implementation 'com.gorisse.thomas.sceneform:sceneform:1.21.0'
    implementation 'androidx.fragment:fragment-ktx:1.5.3'
    implementation 'androidx.appcompat:appcompat:1.5.1'
    implementation 'com.google.android.material:material:1.6.1'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'androidx.navigation:navigation-ui:2.5.2'
    implementation 'androidx.navigation:navigation-fragment:2.5.2'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}

内容的提问来源于stack exchange,提问作者Philip

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.15 18:31:08