【问题标题】:Flutter Error: Could not determine the dependencies of task ':app:compileDebugKotlin'Flutter 错误:无法确定任务 ':app:compileDebugKotlin' 的依赖关系
【发布时间】:2021-11-02 15:34:42
【问题描述】:

当我在 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
...

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

【问题讨论】:

  • 你试过运行flutter doctor --android-licenses 吗?检查是否出现任何警告。如果是这样,接受所有许可证可能会解决问题。
  • @MichaelSoliman 是的,我试过了,一切正常,没有警告! :(

标签: android flutter kotlin dart gradle


【解决方案1】:

这种情况发生在我身上好几次

你有没有尝试构建 gradle

  1. cd 安卓
  2. ./gradlew build

它会更详细地显示错误

【讨论】:

  • 请在您的回答中提供更多详细信息。正如目前所写的那样,很难理解您的解决方案。
猜你喜欢
  • 2021-04-14
  • 2022-01-17
  • 2021-02-16
  • 2021-07-25
  • 1970-01-01
  • 2022-01-14
  • 2020-06-30
  • 2021-07-25
  • 2020-04-15
相关资源
最近更新 更多