谷歌地图视图颤抖

时间:2020-05-05 10:02:46

标签: flutter maps

我正在尝试使用google_maps_flutter显示地图视图:^ 0.5.27

这是我的代码

GoogleMap(

              onMapCreated: _onMapCreated,
              initialCameraPosition: CameraPosition(
                target: _center,
                zoom: 11.0,
              ),
            ),

它显示地图视图的空​​白框,并在控制台中打印如下代码

I/zzbz    (31454): Making Creator dynamically
I/DynamiteModule(31454): Considering local module com.google.android.gms.maps_dynamite:0 and remote module com.google.android.gms.maps_dynamite:201512001
I/DynamiteModule(31454): Selected remote version of com.google.android.gms.maps_dynamite, version >= 201512001
V/DynamiteModule(31454): Dynamite loader version >= 2, using loadModule2NoCrashUtils
W/ResourcesManager(31454): Asset path '/system/framework/com.android.media.remotedisplay.jar' does not exist or contains no resources.
W/ResourcesManager(31454): Asset path '/system/framework/com.android.location.provider.jar' does not exist or contains no resources.
I/DynamiteLoaderV2(31454): [71] MapsDynamite.integ
I/Google Maps Android API(31454): Google Play services client version: 12451000
I/Google Maps Android API(31454): Google Play services package version: 201216010
W/System.err(31454): remove failed: ENOENT (No such file or directory) : /data/data/com.example.artistry/files/DATA_ServerControlledParametersManager.data.com.example.artistry
D/AbsListView(31454): Get MotionRecognitionManager
W/System.err(31454): mkdir failed: EEXIST (File exists) : /storage/emulated/0/Android/data/com.example.artistry/cache/debug
W/System.err(31454): mkdir failed: EEXIST (File exists) : /storage/emulated/0/Android/data/com.example.artistry/cache
D/AbsListView(31454): Get MotionRecognitionManager
D/PhoneWindow(31454): *FMB* installDecor mIsFloating : false
D/PhoneWindow(31454): *FMB* installDecor flags : -2139028216
D/PhoneWindow(31454): *FMB* isFloatingMenuEnabled mFloatingMenuBtn : null
D/PhoneWindow(31454): *FMB* isFloatingMenuEnabled return false
D/mali_winsys(31454): new_window_surface returns 0x3000,  [1440x800]-format:1
D/mali_winsys(31454): new_window_surface returns 0x3000,  [1440x800]-format:2
I/Google Maps Android API(31454): Google Play services package version: 201216010
D/AbsListView(31454): Get MotionRecognitionManager
D/AbsListView(31454): Get MotionRecognitionManager
D/PhoneWindow(31454): *FMB* installDecor mIsFloating : false
D/PhoneWindow(31454): *FMB* installDecor flags : -2139028216
E/BufferQueueProducer(31454): [unnamed-31454-0] dequeueBuffer: BufferQueue has been abandoned
E/BufferQueueProducer(31454): [unnamed-31454-0] dequeueBuffer: BufferQueue has been abandoned
D/PhoneWindow(31454): *FMB* isFloatingMenuEnabled mFloatingMenuBtn : null
D/PhoneWindow(31454): *FMB* isFloatingMenuEnabled return false
D/mali_winsys(31454): new_window_surface returns 0x3000,  [1440x800]-format:1
D/mali_winsys(31454): new_window_surface returns 0x3000,  [1440x800]-format:2
E/Google Maps Android API(31454): Authorization failure.  Please see https://developers.google.com/maps/documentation/android-api/start for how to correctly set up the map.
E/Google Maps Android API(31454): In the Google Developer Console (https://console.developers.google.com)
E/Google Maps Android API(31454): Ensure that the "Google Maps Android API v2" is enabled.
E/Google Maps Android API(31454): Ensure that the following Android Key exists:
E/Google Maps Android API(31454):       API Key: AIzaSyD0mFFadqunaV56Hl8hmJ2PT3aL9n95Jcc
E/Google Maps Android API(31454):       Android Application (<cert_fingerprint>;<package_name>): 68:FD:34:AA:42:B4:5A:D4:51:D7:CA:7D:88:B7:B7:EC:CC:E9:8E:93;com.example.artistry
W/DynamiteModule(31454): Local module descriptor class for com.google.android.gms.googlecertificates not found.
I/DynamiteModule(31454): Considering local module com.google.android.gms.googlecertificates:0 and remote module com.google.android.gms.googlecertificates:4
I/DynamiteModule(31454): Selected remote version of com.google.android.gms.googlecertificates, version >= 4
I/DynamiteLoaderV2(31454): [71] Googlecertificates

谁能解释发生了什么事? 输出是如此空。.仅在页面上显示google以及+和-符号

1 个答案:

答案 0 :(得分:0)

您收到授权失败错误。请再次检查是否已在Google Developer Console中启用Maps SDK for Android/iOS,并检查API Key是否正确。