Open dhruv048 opened 4 years ago
I have the same issue, I tried every thing and still not working.
These are the first two lines of the errors
MissingPluginException(No implementation found for method checkServiceStatus on channel com.baseflow.flutter/location_permissions) E/flutter ( 6811): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(error, java.lang.IllegalStateException: Trying to create a platform view of unregistered type: plugins.flutter.io/google_maps E/flutter ( 6811): at io.flutter.plugin.platform.PlatformViewsController$1.createPlatformView(PlatformViewsController.java:97)
By looking at the error message, it sounds like you are using either geolocator or location_permissions package in your project.
This package internally uses geolocator package which has a reference to 'location_permission' package and sounds like it conflicts with each other. You might need to adjust the version of geolocator or location_permission.
Hi @fysoul17 ,
Thanks for your answer, this is my code and it's a brand new project. I'm just trying to make it work on Android first now.
I added to pubspec.yaml ===> google_maps_place_picker: ^0.9.4
And in AndroidManifest.xml ===> meta-data android:name="com.google.android.geo.API_KEY" android:value="I added my API key here"/>
-------------------------------------
import 'package:flutter/material.dart'; import 'package:google_maps_place_picker/google_maps_place_picker.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart';
class _MyHomePageState extends State
@override Widget build(BuildContext context) { return Scaffold( body: Center( child: RaisedButton( child: Text('click'), onPressed: () { Navigator.push( context, MaterialPageRoute( builder: (context) => PlacePicker( apiKey: "I added my API key here also", initialPosition: kInitialPosition, useCurrentLocation: true, onPlacePicked: (result) { selectedPlace = result; //print("Result: $result"); Navigator.of(context).pop(); }, ), ), ); }, ), ), ); } }
As answered above, I need to know whether you have geolocator or location_permission in your pubspec.yaml. Can you provide whole codes in pubspec.yaml?
Hi @fysoul17,
Thanks for your answer. I found the problem, I was replacing
meta-data android:name="flutterEm" android:value="2" />
with
meta-data android:name="com.google.android.geo.API_KEY" android:value=" my API key here "/>
rather than just add the new meta-data
@FadiBasheer. Glad you found the solution. ;)
When i click the button, a white screen appears with textformfield on top and a tiny blue dot in the middle, can you please help me out with that