>source

플러터 앱을 실행하는 동안 Gradle 빌드 중에 실패에 직면했습니다. 이 문제는 이전에는 없었으며 무작위로 발생한 것으로 보입니다. 나는 그것을 해결하기 위해 무엇을해야하는지 잘 모르겠습니다!

FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve org.jetbrains.kotlin:kotlin-stdlib:1.4.10.
     Required by:
         project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50
         project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.50
         project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.3.50
         project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.3.50
         project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.3.50
         project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.3.50
         project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.3.50
         project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-native-utils:1.3.50
         project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.3.50 > org.jetbrains.kotlin:kotlin-scripting-common:1.3.50
         project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.3.50 > org.jetbrains.kotlin:kotlin-scripting-jvm:1.3.50
         project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-native-utils:1.3.50 > org.jetbrains.kotlin:kotlin-util-io:1.3.50
      > Skipped due to earlier error
   > Could not resolve org.jetbrains.kotlin:kotlin-stdlib:1.4.10.
     Required by:
         project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build.jetifier:jetifier-core:1.0.0-beta09
         project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta09
      > Skipped due to earlier error
   > Could not resolve org.jetbrains.kotlin:kotlin-stdlib:1.4.10.
     Required by:
         project : > org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 > org.jetbrains.kotlin:kotlin-reflect:1.3.72
      > Skipped due to earlier error
   > Could not resolve javax.activation:javax.activation-api:1.2.0.
     Required by:
         project : > com.android.tools.build:gradle:4.1.0 > androidx.databinding:databinding-compiler-common:4.1.0 > org.glassfish.jaxb:jaxb-runtime:2.3.1
         project : > com.android.tools.build:gradle:4.1.0 > androidx.databinding:databinding-compiler-common:4.1.0 > org.glassfish.jaxb:jaxb-runtime:2.3.1 > javax.xml.bind:jaxb-api:2.3.1

내 프로젝트/build.gradle 파일은 다음과 같습니다.

buildscript {
    ext.kotlin_version= '1.3.50'
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.google.gms:google-services:4.3.10'
    }
}
allprojects {
    repositories {
        google()
        jcenter()
    }
}
rootProject.buildDir= '../build'
subprojects {
    project.buildDir= "${rootProject.buildDir}/${project.name}"
    project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
    delete rootProject.buildDir
}

도움을 주시면 감사하겠습니다!

  • 답변 # 1

    코틀린 버전 변경

    ext.kotlin_version= '1.4.32'
    

  • 이전 Microsoft.Identity.Web OpenIdConnect가 인증되지 않았습니다. 실패 메시지: 인증되지 않음
  • 다음 ActiveMQ 5.16.2 Log4J