Closed modekano closed 5 years ago
@modekano did you complete the installation instructions.
May I also know the platform (Android/iOS) you're facing this issue on??
@blackmann I complete the installation instructions, I use Android platform
@modekano does the place picker screen show?? And does the search field and nearby places work?
@blackmann All are show,
@modekano then I guess your manifest might be missing something... can you post your AndroidManifest.xml
(try to hide/replace your API key with xxxxxxxxxx).
If you're using VS Code, can you post any error log relating to the maps as well?
@blackmann manifest code: `<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.pick_location">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="pick_location"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- This keeps the window background of the activity showing
until Flutter renders its first frame. It can be removed if
there is no splash screen (such as the default splash screen
defined in @style/LaunchTheme). -->
<meta-data
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
`
You should add
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
in the <application>
tag. Like this
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="pick_location"
android:icon="@mipmap/ic_launcher">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- This keeps the window background of the activity showing
until Flutter renders its first frame. It can be removed if
there is no splash screen (such as the default splash screen
defined in @style/LaunchTheme). -->
<meta-data
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
@blackmann I already add it in the top but not show in my post.
I note something when i navigate to place picker screen and tap on the map space the log show as below:
ayout (package:flutter/src/rendering/proxy_box.dart:105:13) E/flutter (26600): #30 RenderObject.layout (package:flutter/src/rendering/object.dart:1644:7) E/flutter (26600): #31 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13) E/flutter (26600): #32 RenderObject.layout (package:flutter/src/rendering/object.dart:1644:7) E/flutter (26600): #33 RenderOffstage.performLayout (package:flutter/src/rendering/proxy_box.dart:3013:14) E/flutter (26600): #34 RenderObject.layout (package:flutter/src/rendering/object.dart:1644:7) E/flutter (26600): #35 RenderStack.performLayout (package:flutter/src I/BufferQueueProducer(26600): [SurfaceTexture-0-26600-4](this:0x7f94690000,id:4,api:1,p:265,c:26600) connect(P): api=1 producer=(265:???) producerControlledByApp=false E/BufferQueueProducer(26600): [SurfaceTexture-0-26600-0](this:0x7f965f4000,id:0,api:1,p:265,c:-1) dequeueBuffer: BufferQueue has been abandoned I/System (26600): FinalizerDaemon: finalize objects = 18 I/BufferQueueConsumer(26600): [SurfaceTexture-0-26600-4](this:0x7f94690000,id:4,api:1,p:265,c:-1) disconnect(C) I/BufferQueueConsumer(26600): [SurfaceTexture-0-26600-3](this:0x7f92703400,id:3,api:1,p:265,c:-1) disconnect(C) E/BufferQueueProducer(26600): [SurfaceTexture-0-26600-4](this:0x7f94690000,id:4,api:1,p:265,c:-1) query: BufferQueue has been abandoned D/GraphicBuffer(26600): unregister, handle(0x7f926b4520) (w:720 h:512 s:720 f:0x1 u:0x000300) I/[MALI][Gralloc](26600): [-]r_hnd(0x7f926b4520), client(50), share_fd(71) D/GraphicBuffer(26600): unregister, handle(0x7f9160c5a0) (w:720 h:512 s:720 f:0x1 u:0x000300) I/[MALI][Gralloc](26600): [-]r_hnd(0x7f9160c5a0), client(50), share_fd(77) I/BufferQueueConsumer(26600): [SurfaceTexture-0-26600-2](this:0x7f95f51c00,id:2,api:1,p:265,c:-1) disconnect(C) D/GraphicBuffer(26600): unregister, handle(0x7f926b1140) (w:720 h:512 s:720 f:0x1 u:0x000300) I/[MALI][Gralloc](26600): [-]r_hnd(0x7f926b1140), client(50), share_fd(65) D/GraphicBuffer(26600): unregister, handle(0x7f9160f3e0) (w:720 h:512 s:720 f:0x1 u:0x000300) I/[MALI][Gralloc](26600): [-]r_hnd(0x7f9160f3e0), client(50), share_fd(73) I/[MALI][Gralloc](26600): [+]r_hnd(0x7f8f8dcfc0), client(50), share_fd(77) D/GraphicBuffer(26600): register, handle(0x7f8f8dcfc0) (w:720 h:1184 s:720 f:0x1 u:0x000b00) D/GED (26600): Frame didn't finished in 1000 ms (try = 1) D/GED (26600): Fence fd = 65 D/GED (26600): fence SurfaceView:2 0 D/GED (26600): pt timeline-primary-0-0 sw_sync status(0) sync_drv(69139) 0.000000 E/BufferQueueProducer(26600): [SurfaceTexture-0-26600-0](this:0x7f965f4000,id:0,api:1,p:265,c:-1) query: BufferQueue has been abandoned E/BufferQueueProducer(26600): [SurfaceTexture-0-26600-1](this:0x7f92664000,id:1,api:1,p:265,c:-1) query: BufferQueue has been abandoned E/BufferQueueProducer(26600): [SurfaceTexture-0-26600-2](this:0x7f95f51c00,id:2,api:1,p:265,c:-1) query: BufferQueue has been abandoned E/BufferQueueProducer(26600): [SurfaceTexture-0-26600-3](this:0x7f92703400,id:3,api:1,p:265,c:-1) query: BufferQueue has been abandoned E/BufferQueueProducer(26600): [SurfaceTexture-0-26600-4](this:0x7f94690000,id:4,api:1,p:265,c:-1) query: BufferQueue has been abandoned E/BufferQueueProducer(26600): [SurfaceTexture-0-26600-4](this:0x7f94690000,id:4,api:1,p:265,c:-1) query: BufferQueue has been abandoned E/BufferQueueProducer(26600): [SurfaceTexture-0-26600-0](this:0x7f965f4000,id:0,api:1,p:265,c:-1) dequeueBuffer: BufferQueue has been abandoned E/BufferQueueProducer(26600): [SurfaceTexture-0-26600-0](this:0x7f965f4000,id:0,api:1,p:265,c:-1) dequeueBuffer: BufferQueue has been abandoned W/MALI (26600): dis
@modekano now I guess the problem now will be related to your API key. To confirm that, I need to know if the autocomplete for search works?
And did the permission request show up when you first launched the demo??
@blackmann Autocomplete not work, permission request not show up, but I did it through setting
@modekano there is a mistake in the AndroidManifest.xml
it does not match the installation instructions.
Use this manifest template instead, and replace the api key value.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.pickerdemo">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:name="io.flutter.app.FlutterApplication"
android:label="pickerdemo"
android:icon="@mipmap/ic_launcher">
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="XXXXXXXXX"/>
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- This keeps the window background of the activity showing
until Flutter renders its first frame. It can be removed if
there is no splash screen (such as the default splash screen
defined in @style/LaunchTheme). -->
<meta-data
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
the meta for API_KEY should be in the application
tag
Also for autocomplete search to work, you need to enable Places API for your API key
@blackmann I change the API_KEY to applications, still map not show up. I will enable Places API and feed you regarding autocomplete
@modekano can you edit your manifest to match the one I just posted as well. The position of your API key meta is at the wrong place.
Use this instead: https://github.com/blackmann/locationpicker/issues/1#issuecomment-500229342
@blackmann I change the API_KEY to applications, still map not show up. I will enable Places API and feed you regarding autocomplete
You need to rebuild the whole application for changes to take effect. I hope you did that.
@blackmann I add Places API and change the manifest and rebuild the app, now the autocomplete is working but the map still not show up.
@modekano Great. can you privately give me access to your project so I help you
@blackmann Please check this link: https://github.com/modekano/pick-your-location/invitations
@modekano I just tried your project with my API Key and everything works fine. I didn't change anything except provide my API key. I think you don't have Maps API enabled for the key.
@blackmann But my key is work in other App. This the API I was enable, do i have to enable other API? Places API Maps SDK for Android Geocoding API
@modekano Could you rather create a new API key as per this comment? I think I personally faced similar issue before and had to just create a new API key.
https://github.com/flutter/flutter/issues/30649#issuecomment-488850520
@blackmann I create new apis, all function work properly, but still map no show.
@modekano do you have any restrictions on the API key??
@blackmann I use same API in other app it work perfect, I tested in real device Android 6 may be version issue?
@blackmann Do you check this issue with android, I change API many time but still not show up all other functions working fine.
@modekano sorry for the late reply. I'll create an issue in the repo you shared... and help you resolve the issue
@blackmann This issue solved , after run flutter clean and rebuild the app the map show app.
@blackmann This issue solved , after run flutter clean and rebuild the app the map show app.
I have the same problem. I did the flutter clean, rebuild and the map still does not show. Search and nearby places work, just the map that doesn't show. All map features are enabled.
@wolvsky
I have the same problem, how to fix it ? Thank you.
I install the demo when i click in Pick Delivery Location, navigation well but map not show. the map Key API I used I am sure is working.!