flutter - 找不到 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 :
解决方案
好像you are not connected to internet
。Flutter 无法下载所需的依赖项。请使用新库连接到 Internet 进行第一次构建并运行flutter pub get
,然后flutter run
再运行一次。
让我知道它是否有效。
推荐阅读
- ios - AudioKit - 如何从麦克风获取实时 floatChannelData?
- swift - 程序未检测到与 Physics Body SpriteKit 的碰撞
- vba - 删除excel值并将单元格设置为空
- c++ - std::vector _M_start 和 _M_finish 相同
- laravel - 在 Laravel 中使用 Vue/Axios 加载当前用户
- jquery - 在 WP 中选择更改时更改 YouTube iFrame 源
- node.js - 检测用户是否在 Apache 或 NodeJS 中使用 proxypass
- spring-security - 过滤器无法访问的 Spring Security Endpoints
- sql - 按组的第一个值对值进行分组
- sql-server-2012 - 创建用于连接到 excel 文件的链接服务器