【发布时间】:2021-08-17 08:27:37
【问题描述】:
我有一个flutter项目,从昨天开始就出现这样的错误
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
> Could not resolve com.google.android.gms:play-services-location:16.+.
Required by:
project :app > project :location
> Failed to list versions for com.google.android.gms:play-services-location.
> Unable to load Maven meta-data from https://jcenter.bintray.com/com/google/android/gms/play-services-location/maven-metadata.xml.
> Could not get resource 'https://jcenter.bintray.com/com/google/android/gms/play-services-location/maven-metadata.xml'.
> Could not GET 'https://jcenter.bintray.com/com/google/android/gms/play-services-location/maven-metadata.xml'.
> Connect to jcenter.bintray.com:443 [jcenter.bintray.com/34.95.74.180] failed: Read timed out
不知道,新建项目的时候可以运行,但是添加位置库的时候,出现这样的错误。 这是我的 pubspec.yaml
dependencies:
flutter:
sdk: flutter
shared_preferences: ^0.5.6+1
http: ^0.12.0+4
intl: ^0.16.1
location: ^3.2.4
另外,这是我的颤振医生:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 1.22.5, on Microsoft Windows [Version 10.0.19042.985], locale en-ID)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[√] Android Studio (version 3.5)
[√] VS Code (version 1.56.2)
[√] Connected device (1 available)
• No issues found!
【问题讨论】:
标签: flutter flutter-dependencies