apptreesoftware / flutter_google_map_view

A flutter plugin for Google Maps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build error with map_view, flutter & gradle

suryanitjsr opened this issue · comments

I get a build error using flutter version 1.2.2 and map_view version 0.0.14.

I tried to use this code in build.gradle


classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.2-4'
I followed all the steps here https://pub.dartlang.org/packages/map_view#-readme-tab-

I have an api-key but get the following build error

Error running Gradle: ProcessException: Process “C:UsersAlmoit PCDesktopMyAppMapflutter_app2androidgradlew.bat” exited
abnormally:

Configure project :map_view
WARNING: The specified Android SDK Build Tools version (27.0.3) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.2.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove “buildToolsVersion ‘27.0.3’” from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

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.

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 10s

 Command: D:\development\flutter\flutter_course\android\gradlew.bat app:properties
Please review your Gradle project setup in the android/ folder.

With flutter doctor, everything seems fine.

flutter doctor -v

[√] Flutter (Channel stable, v1.2.1, on Microsoft Windows [Version 10.0.17763.437], locale en-AI)
    • Flutter version 1.2.1 at C:flutter
    • Framework revision 8661d8aecd (10 weeks ago), 2019-02-14 19:19:53 -0800
    • Engine revision 3757390fa4
    • Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)

[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at C:Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = C:Sdk
    • Java binary at: C:Program FilesAndroidAndroid Studiojrebinjava
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    • All Android licenses accepted.

[√] Android Studio (version 3.3)
    • Android Studio at C:Program FilesAndroidAndroid Studio
    • Flutter plugin version 33.4.1
    • Dart plugin version 182.5215
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[√] Connected device (1 available)
    • SPH L520 • 2d81b4cf • android-arm • Android 4.4.2 (API 19)

• No issues found!

I searched it everywhere but can't find the answer. Please help me regarding this.

I am having the exact same issue and I believe it requires downgrading the Android gradle. I have been trying to get this to work right now.