Skip to content

Google_Maps_Flutter crashes when flutter run #1

Description

@canguress

My code belove, when i flutter run i have issues belove too. Please help!

import 'dart:async';

import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';

class MainScreen extends StatefulWidget {
  static const String idScreen = "mainScreen";

  @override
  _MainScreenState createState() => _MainScreenState();
}

class _MainScreenState extends State<MainScreen> {
  Completer<GoogleMapController> _controllerGoogleMap = Completer();
  GoogleMapController newGoogleMapController;
  static final CameraPosition _kGooglePlex = CameraPosition(
      target: LatLng(37.42796133580664, -122.085749655962), zoom: 14.4746);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        centerTitle: true,
        title: Text("hii"),
      ),
      body: Stack(
        children: [
          GoogleMap(
            mapType: MapType.normal,
            myLocationButtonEnabled: true,
            initialCameraPosition: _kGooglePlex,
            onMapCreated: (GoogleMapController controller) {
              _controllerGoogleMap.complete(controller);
              newGoogleMapController = controller;
            },
          ),
        ],
      ),
    );
  }
}

Error belove:

I/OpenGLRenderer(15092): Davey! duration=1088ms; Flags=1, IntendedVsync=7232125155128, Vsync=7233141821754, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=7233152513100, AnimationStart=7233152561700, PerformTraversalsStart=7233153889000, DrawStart=7233161541400, SyncQueued=7233162647100, SyncStart=7233164964000, IssueDrawCommandsStart=7233165105900, SwapBuffers=7233176247200, FrameCompleted=7233215644800, DequeueBufferDuration=15432000, QueueBufferDuration=613000,
Connecting to VM Service at ws://127.0.0.1:57912/TYn1ntDB-58=/ws
D/EGL_emulation(15092): eglMakeCurrent: 0xe2da04e0: ver 2 0 (tinfo 0xe4803aa0)
D/eglCodecCommon(15092): setVertexArrayObject: set vao to 0 (0) 1 0
I/zzbz    (15092): Making Creator dynamically
I/DynamiteModule(15092): Considering local module com.google.android.gms.maps_dynamite:0 and remote module com.google.android.gms.maps_dynamite:203112999
I/DynamiteModule(15092): Selected remote version of com.google.android.gms.maps_dynamite, version >= 203112999
V/DynamiteModule(15092): Dynamite loader version >= 2, using loadModule2NoCrashUtils
W/m.example.iser(15092): Unsupported class loader
W/m.example.iser(15092): Skipping duplicate class check due to unsupported classloader
I/Google Maps Android API(15092): Google Play services client version: 12451000
I/Google Maps Android API(15092): Google Play services package version: 204516031
W/m.example.iser(15092): Accessing hidden field Ljava/nio/Buffer;->address:J (light greylist, reflection)
E/AndroidRuntime(15092): FATAL EXCEPTION: main
E/AndroidRuntime(15092): Process: com.example.iserv, PID: 15092
E/AndroidRuntime(15092): java.lang.AbstractMethodError: abstract method "void io.flutter.plugin.platform.PlatformView.onFlutterViewAttached(android.view.View)"
E/AndroidRuntime(15092): 	at io.flutter.plugin.platform.VirtualDisplayController.onFlutterViewAttached(VirtualDisplayController.java:181)
E/AndroidRuntime(15092): 	at io.flutter.plugin.platform.PlatformViewsController$1.createVirtualDisplayForPlatformView(PlatformViewsController.java:233)

I tried these solutions:

--> Enabled Maps for Adroid SDK and Maps for IOS SDK
--> flutter clean
-->Downgraded/Upgraded Gradle and minSDK versions
--> Deleted AVD and created new one with optimized API and SDK level

Still facing with these problems. I hope there is someone can help me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions