使用map_view,flutter和gradle构建错误

时间:2019-06-10 20:47:04

标签: android gradle flutter visual-studio-code android-mapview

我正在尝试在flutter应用程序中包含android map_view。我已经成功解锁了API,并完成了权限请求。但是我在构建应用程序时出错。我已经搜索并尝试找到解决方案,现在出现以下问题:

首先我得到一个错误:

FAILURE: Build failed with an exception.

* What went wrong:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.2.51 and higher. Project 'android' is using version 1.1.2-4

我搜索了该文件,并在以下路径上将Kotlin Gradle插件版本更改为1.2.51:

\Pub\Cache\hosted\pub.dartlang.org\map_view-0.0.14\android\build.gradle

并在项目的android build.gradle中。 现在,这导致另一个错误:

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':map_view:androidApis'.
> Failed to transform file 'android.jar' to match attributes {artifactType=android-platform-attr} using transform PlatformAttrTransform
   > java.io.FileNotFoundException: C:\Users\Harsh Goyal\AppData\Local\Android\sdk\platforms\android-27\android.jar (The system cannot find the file specified)

现在我找不到其他解决方案。 任何帮助表示赞赏。

0 个答案:

没有答案
相关问题