首页 > 解决方案 > 颤振错误:无法确定任务':app:compileDebugKotlin'的依赖关系

问题描述

当我在 android studio 中运行我的第一个颤振应用程序时出现此错误。我的模拟器互联网已连接并且飞行模式已关闭。我看到了其他类似的问题,但没有一个像这个错误,他们没有帮助我。谁能帮我?

Launching lib\main.dart on sdk gphone x86 in debug mode...
Running Gradle task 'assembleDebug'...
Could not resolve compiler classpath. Check if Kotlin Gradle plugin repository is configured in project ':app'.

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:compileDebugKotlin'.
> Could not resolve all files for configuration ':app:kotlinCompilerClasspath'.
   > Could not resolve org.jetbrains.kotlin:kotlin-stdlib-common:1.3.50.
     Required by:
         project :app > org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.50 > org.jetbrains.kotlin:kotlin-stdlib:1.3.50
      > Could not resolve org.jetbrains.kotlin:kotlin-stdlib-common:1.3.50.
         > Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-common/1.3.50/kotlin-stdlib-common-1.3.50.pom'.
            > Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-common/1.3.50/kotlin-stdlib-common-1.3.50.pom'. Received status code 403 from server: Forbidden
      > Could not resolve org.jetbrains.kotlin:kotlin-stdlib-common:1.3.50.
         > Could not get resource 'https://storage.googleapis.com/download.flutter.io/org/jetbrains/kotlin/kotlin-stdlib-common/1.3.50/kotlin-stdlib-common-1.3.50.pom'.
            > Could not GET 'https://storage.googleapis.com/download.flutter.io/org/jetbrains/kotlin/kotlin-stdlib-common/1.3.50/kotlin-stdlib-common-1.3.50.pom'. Received status code 403 from server: Forbidden
...

如果需要更多详细信息,请告诉我。谢谢。

标签: androidflutterkotlindartgradle

解决方案


这发生在我身上好几次

你有没有尝试构建 gradle

  1. 光盘安卓
  2. ./gradlew 构建

它将更详细地显示错误


推荐阅读