【发布时间】:2022-01-10 21:15:42
【问题描述】:
我有一个带有位置库的颤振项目,但是出现了这样的错误:
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> 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://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-location/maven-metadata.xml.
> Could not HEAD 'https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-location/maven-metadata.xml'.
> PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
> Failed to list versions for com.google.android.gms:play-services-location.
> Unable to load Maven meta-data from https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-location/maven-metadata.xml.
> Could not HEAD 'https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-location/maven-metadata.xml'.
> PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
> Failed to list versions for com.google.android.gms:play-services-location.
> Unable to load Maven meta-data from https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-location/maven-metadata.xml.
还有这个库位置版本:
location: any
这是我的 gradle.build :
repositories {
google()
mavenCentral()
}
}
【问题讨论】:
-
嗨,您找到任何解决方案了吗
-
还没有,但我正在将库从服务位置更改为地理定位器。
-
我通过在本地下载位置包并更新版本代码解决了
-
能发个下载地址包的链接吗?
-
它在pub.dev右侧可用,---github.com/Lyokone/flutterlocation
标签: flutter dart gradle location google-play-services