我试图将谷歌地图添加到我的颤振项目中
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 版本更改为另一个版本,正如它在其他帖子中所建议的那样,但这并没有帮助。我真的不知道问题是什么,因为没有地图项目编译,我检查了。