【问题标题】:Flutter google maps android build failed颤振谷歌地图android构建失败
【发布时间】:2020-07-26 07:19:13
【问题描述】:

我尝试将谷歌地图添加到我的颤振项目中

dependencies:

  geolocator: ^2.1.0
  google_maps_flutter:
<manifest ...
  <application ...
    <meta-data android:name="com.google.android.geo.API_KEY"
               android:value="my key was here"/>

问题是添加这个依赖后,每次运行 - 构建都失败并显示此消息:

FAILURE: Build failed with an exception.

* What went wrong:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.10 and higher.
The following dependencies do not satisfy the required version:
project ':google_api_availability' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2s
Finished with error: Gradle task assembleDebug failed with exit code 1

当然,我尝试将 gradle 版本更改为另一个版本,正如它在其他帖子中所建议的那样,但它没有帮助。 我真的不知道问题出在哪里,因为没有maps项​​目编译,我检查了。

【问题讨论】:

    标签: android flutter kotlin gradle google-maps-flutter


    【解决方案1】:

    您必须通过运行命令flutter pub upgrade 来升级依赖于google_api_availabilitygeolocator

    【讨论】:

      猜你喜欢
      • 2020-07-19
      • 2021-11-23
      • 2021-06-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-01
      相关资源
      最近更新 更多