收到此錯誤
* What went wrong:
Could not determine the dependencies of task ':app:lintVitalRelease'.
> Could not resolve all dependencies for configuration ':app:debugCompileClasspath'.
> Problems reading data from Binary store in /tmp/gradle16425735337117079234.bin offset 753438 exists? true
的結果flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[?] Flutter (Channel stable, 2.10.5, on Manjaro Linux 5.15.32-1-MANJARO, locale en_IN)
[?] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[?] Chrome - develop for the web
[?] Android Studio (version 2021.1)
[?] Connected device (1 available)
[?] HTTP Host Availability
? No issues found!
android/build.gradle 的內容
buildscript {
ext.kotlin_version = '1.6.10'
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.8'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.0'
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven { url 'https://jitpack.io' }
maven { url 'http://developer.huawei.com/repo/' }
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
uj5u.com熱心網友回復:
相同的。存盤庫失敗?我沒有更改任何底層的 android 成績檔案等。我想知道 jcenter() 現在離線是否有什么關系......
uj5u.com熱心網友回復:
修復了這個。就我而言,它是
implementation 'com.facebook.android:facebook-android-sdk:[5,6)'
切換到
implementation 'com.facebook.android:facebook-android-sdk:6'
在 app/build.gradle 檔案中。
https://github.com/gradle/gradle/issues/20515#issuecomment-1121012872
uj5u.com熱心網友回復:
是jcenter的不適用于某些圖書館。
洗掉已修復此問題jcenter()。android/build.gralde此外,請確保您的所有庫都存在于maven. 否則,您將在構建時收到“未找到”錯誤。
uj5u.com熱心網友回復:
您需要Android Studio 4.1,它與這些構建工具相匹配:
com.android.tools.build:gradle:4.1.0
例如。對于 Android Studio Chipmunk,這已經是7.2.0. 并洗掉jcenter().
uj5u.com熱心網友回復:
在應用程式級別 build.gradle 將此行更改 // implementation 'com.facebook.android:facebook-login:[5,6)' 到此 implementation 'com.facebook.android:facebook-login:6'
uj5u.com熱心網友回復:
您只需要在 build.gradle 中更改此行
實施 'com.facebook.android:facebook-core:[4,5)'
對此
實施 'com.facebook.android:facebook-core:5'
或者這個實作 'com.facebook.android:facebook-android-sdk:[5,6)'
對此
實施 'com.facebook.android:facebook-android-sdk:6'
uj5u.com熱心網友回復:
我花了將近 4 天的時間試圖解決這個問題,最后我找到了適合我的專案的解決方案。對我來說,問題出在 librarylocation: ^2.3.5上,一旦我洗掉了我的專案,我的專案就恢復了活力。
我建議做的事情:復制你的專案檔案夾,替換/lib為標準的flutter創建模板,并開始pubspec.yaml一個一個地洗掉依賴項,直到找到導致問題的那個。
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/473887.html
上一篇:回應中的Django模型默認值
下一篇:將androidstudio升級到AndroidStudioChipmunk后|2021.2.1得到這個gradle問題
