Android Studio 在任务“:app:generateDebugApolloIR”(类型为“ApolloIRGenTask”)的配置中发现一些问题

ghhkc1vu  于 2022-11-16  发布在  Android
关注(0)|答案(1)|浏览(100)

我已将Gradle版本更新为最新版本,但现在我的项目无法构建。构建项目时logcat上显示以下错误。

FAILURE: Build failed with an exception.

* What went wrong:
Some problems were found with the configuration of task ':app:generateDebugApolloIR' (type 'ApolloIRGenTask').
  - In plugin 'com.amazonaws.appsync' type 'com.apollographql.apollo.gradle.ApolloIRGenTask' field 'extension' without corresponding getter has been annotated with @Internal.
    
    Reason: Annotations on fields are only used if there's a corresponding getter for the field.

我尝试过重建项目,清理项目,使缓存无效。但仍然有同样的问题。我的build.gradle项目级别:

dependencies {
    classpath 'com.android.tools.build:gradle:7.3.1'
    classpath 'com.google.gms:google-services:4.3.14'
    classpath 'com.google.ar.sceneform:plugin:1.17.1'
    classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
    classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10'
    classpath 'com.amplifyframework:amplify-tools-gradle-plugin:1.0.1'
    classpath "com.amazonaws:aws-android-sdk-appsync-gradle-plugin:3.1.0"

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

build.gradle应用程序级别

//AWS
implementation 'com.amplifyframework:core:1.29.0' //updated
implementation 'com.amplifyframework:aws-api:1.28.3' //updated
implementation 'com.amplifyframework:aws-datastore:1.28.3' //updated
implementation 'com.amazonaws:aws-android-sdk-appsync:3.1.1' //updated 
implementation 'com.amazonaws:aws-android-sdk-s3:2.35.0' //updated
p4tfgftt

p4tfgftt1#

升级库版本
建筑等级工程等级

dependencies {
        classpath 'com.android.tools.build:gradle:7.3.1'
        classpath 'com.google.gms:google-services:4.3.14'
        classpath 'com.google.ar.sceneform:plugin:1.17.1'
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
        classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10'
        classpath 'com.amplifyframework:amplify-tools-gradle-plugin:1.0.1'
        classpath "com.amazonaws:aws-android-sdk-appsync-gradle-plugin:3.3.0"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }

构建Gradle应用程序级别

//AWS
    implementation 'com.amplifyframework:core:1.31.3' //updated 1.31.3
    implementation 'com.amplifyframework:aws-api:1.28.3' //updated
    implementation 'com.amplifyframework:aws-datastore:1.28.3' //updated
    implementation 'com.amazonaws:aws-android-sdk-appsync:3.3.0' //updated 3.3.0
    implementation 'com.amazonaws:aws-android-sdk-s3:2.40.0' //updated 2.40.0

立即构建项目,它将工作

相关问题