marchdev-tk / flutter_google_maps

A Flutter plugin for integrating Google Maps in iOS, Android and Web applications. It is a wrapper of google_maps_flutter for Mobile and google_maps for Web.
BSD 3-Clause "New" or "Revised" License
87 stars 57 forks source link

im able to build debug but release says "The plugin google_maps_flutter could not be built due to the issue above." #64

Closed zaid13 closed 3 years ago

zaid13 commented 3 years ago

import io.flutter.embedding.engine.plugins.lifecycle.FlutterLifecycleAdapter; ^ symbol: class FlutterLifecycleAdapter location: package io.flutter.embedding.engine.plugins.lifecycle 1 error

FAILURE: Build failed with an exception.

BUILD FAILED in 2s

The plugin google_maps_flutter could not be built due to the issue above.

this is what my error looks like i have updgraded my flutter version and even started new project but i see this error

zaid13 commented 3 years ago

solved

upgrade your

classpath 'com.android.tools.build:gradle:3.4.2' classpath 'com.google.gms:google-services:4.3.5'

add android/app/proguard-rules.pro :

-ignorewarnings -keep class androidx.lifecycle.DefaultLifecycleObserver -keep class { public private ; }


in app/build.gradle

add buildTypes { release { signingConfig signingConfigs.debug useProguard true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'