![](/img/trans.png)
[英]Could not find method classpath() for arguments [com.android.tools.build:gradle:3.3.0] on object of type:
[英]Error: Could not find com.android.tools.build:gradle:3.3.0 in flutter
嗨,我的 gradle 版本是 7.3.3,我的 flutter 版本是 2.8.1
這是我運行應用程序時的錯誤:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':path_provider_android'
> Could not resolve all artifacts for configuration ':path_provider_android:classpath'
> Could not find com.android.tools.build:gradle:3.3.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.3.0/gradle-3.3.0.pom
- https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/3.3.0/gradle-3.3.0.pom
要解決此問題 go 並檢查項目級別 build.gradle 文件中的 google() 存儲庫
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
}
}
allprojects {
repositories {
jcenter()
google()
}
}
Jcenter 應該在 2 月 1 日關閉。但今天我開始遇到問題。 在一項研究中,我發現這個Flutter 遷移 jcenter 到 mavenCentral
現在有一個大問題,因為很多酒吧都依賴於這種變化......現在我正在等待社區修復它
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.