首页 > 解决方案 > 找不到 org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.5 0

问题描述

美好的一天,我即将将我的应用程序部署为 APK。一切都很好,因为我对手机进行了调试。我已准备好将其构建为 APK。这发生了。这个错误不断出现,我不知道该怎么做。

Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.5  0.
Searched in the following locations:
  - https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.3.5  0/kotlin-gradle-plugin-1.3.5  0.pom
  - https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.3.5  0/kotlin-gradle-plugin-1.3.5  0.jar
  - https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.3.5  0/kotlin-gradle-plugin-1.3.5  0.pom
  - https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.3.5  0/kotlin-gradle-plugin-1.3.5  0.jar
Required by:
    project :

还尝试在我的手机上运行它,这发生了

Launching lib\main.dart on CPH1803 in debug mode...
Running Gradle task 'assembleDebug'...

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 find com.android.tools.build:gradle:3.5.1.
     Searched in the following locations:
       - http://jcenter.bintray.com/com/android/tools/build/gradle/3.5.1/gradle-3.5.1.pom
       - http://jcenter.bintray.com/com/android/tools/build/gradle/3.5.1/gradle-3.5.1.jar
     Required by:
         project :
   > Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.5  0.
     Searched in the following locations:
       - http://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.3.5  0/kotlin-gradle-plugin-1.3.5  0.pom
       - http://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.3.5  0/kotlin-gradle-plugin-1.3.5  0.jar
     Required by:
         project :

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 46s
Exception: Gradle task assembleDebug failed with exit code 1

我尝试了几种方法,但都不起作用。我不知道该怎么办。

PS,请让它更容易解释,因为我不知道这个问题。如果可能的话,请为像我这样的傻瓜一步一步地做,谢谢。我真的需要你的帮助。请!!!谢谢

更新> 这是 app\build.gradle 中的新错误

Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.5  0.
Searched in the following locations:
  - https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.3.5  0/kotlin-gradle-plugin-1.3.5  0.pom
  - https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.3.5  0/kotlin-gradle-plugin-1.3.5  0.pom
Required by:
    project :

标签: flutterandroid-studiodartgradle

解决方案


好像you are not connected to internet。Flutter 无法下载所需的依赖项。请使用新库连接到 Internet 进行第一次构建并运行flutter pub get,然后flutter run再运行一次。

让我知道它是否有效。


推荐阅读