【问题标题】:FLUTTER BUILD ERROR Could not resolve com.google.android.gms:play-services-location:16.+颤振构建错误无法解析 com.google.android.gms:play-services-location:16.+
【发布时间】: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


【解决方案1】:

关闭 wifi,然后再次运行。我一周前遇到了同样的问题,还没有解决方案

【讨论】:

  • 我不这么认为,这个库总是有问题。我将库更改为地理定位器并全部固定
猜你喜欢
  • 2022-01-13
  • 2022-01-15
  • 2021-06-12
  • 2021-08-17
  • 2022-01-16
  • 2022-01-15
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多