I am trying to use the google maps api in my flutter application and i am encountering this error for a quite a while?
This is the error message
DisplayEventDispatcher(14114): dispatcher 0x7ed0ac6320 ~ last event processed while scheduling was for 697675542 D/MapsInitializer(14114): preferredRenderer: null D/zzca (14114): preferredRenderer: null I/Google Maps Android API(14114): Google Play services package version: 223017029 I/Google Maps Android API(14114): Google Play services maps renderer version(legacy): 203115000 I/PlatformViewsController(14114): Using hybrid composition for platform view: 0 W/System (14114): ClassLoader referenced unknown path: system/framework/mediatek-cta.jar I/System.out(14114): e:java.lang.ClassNotFoundException: com.mediatek.cta.CtaHttp W/System (14114): ClassLoader referenced unknown path: system/framework/mediatek-cta.jar I/System.out(14114): e:java.lang.ClassNotFoundException: com.mediatek.cta.CtaHttp D/Surface (14114): Surface::disconnect(this=0x7ed0efc000,api=1) D/Surface (14114): Surface::connect(this=0x7ed0b68000,api=1) I/BufferQueueProducer(14114): ImageReader-720x1464f1m3-14114-0 connect(P): api=1 producer=(14114:com.example.location_viewer) producerControlledByApp=true E/libc (14114): Access denied finding property "vendor.debug.bq.line" I/Choreographer(14114): Skipped 2 frames! The application may be doing too much work on its main thread. D/TextureView(14114): getHardwareLayer, createNewSurface:true I/BufferQueue(14114): unnamed-14114-3 BufferQueue core=(14114:com.example.location_viewer) E/libc (14114): Access denied finding property "vendor.debug.sf.stc_interval" E/libc (14114): Access denied finding property "vendor.debug.bq.dump" I/BufferQueueConsumer(14114): unnamed-14114-3 connect(C): consumer=(14114:com.example.location_viewer) controlledByApp=true E/libc (14114): Access denied finding property "vendor.debug.bq.dump" I/BufferQueueConsumer(14114): unnamed-14114-3 setConsumerName: unnamed-14114-3 E/libc (14114): Access denied finding property "vendor.debug.bq.line" E/libc (14114): Access denied finding property "vendor.debug.bq.dump" I/BufferQueueConsumer(14114): SurfaceTexture-0-14114-1 setConsumerName: SurfaceTexture-0-14114-1 E/libc (14114): Access denied finding property "vendor.debug.bq.line" D/Surface (14114): Surface::connect(this=0x7ec54a1000,api=1) I/BufferQueueProducer(14114): SurfaceTexture-0-14114-1 connect(P): api=1 producer=(14114:com.example.location_viewer) producerControlledByApp=true E/libc (14114): Access denied finding property "vendor.debug.bq.line" W/System (14114): ClassLoader referenced unknown path: system/framework/mediatek-cta.jar I/System.out(14114): e:java.lang.ClassNotFoundException: com.mediatek.cta.CtaHttp W/System (14114): ClassLoader referenced unknown path: system/framework/mediatek-cta.jar I/System.out(14114): e:java.lang.ClassNotFoundException: com.mediatek.cta.CtaHttp 6 D/OpenSSLLib(14114): OpensslErr:Module:12(177:); file:external/boringssl/src/crypto/asn1/asn1_lib.c ;Line:168;Function:ASN1_get_object I/location_viewe(14114): Background concurrent copying GC freed 58336(2MB) AllocSpace objects, 4(208KB) LOS objects, 51% free, 3MB/7MB, paused 461us total 102.679ms W/System (14114): ClassLoader referenced unknown path: system/framework/mediatek-cta.jar I/System.out(14114): [OkHttp] sendRequest<< W/System (14114): ClassLoader referenced unknown path: system/framework/mediatek-cta.jar I/System.out(14114): [OkHttp] sendRequest<< I/BufferQueueProducer(14114): SurfaceTexture-0-14114-1 queueBuffer: slot 2 is dropped, handle=0x7ed11e7dc0 I/BufferQueueProducer(14114): SurfaceTexture-0-14114-1 queueBuffer: slot 0 is dropped, handle=0x7ed103a980 I/BufferQueue(14114): SurfaceTexture-0-14114-0 ~BufferQueueCore I/Choreographer(14114): Skipped 1 frames! The application may be doing too much work on its main thread. I/GLConsumer(14114): [SurfaceTexture-0-14114-1] detachFromContext D/Surface (14114): Surface::disconnect(this=0x7ec54a1000,api=1) I/BufferQueueProducer(14114): SurfaceTexture-0-14114-1 disconnect(P): api 1 I/BufferQueueConsumer(14114): SurfaceTexture-0-14114-1 getReleasedBuffers: returning mask 0xffffffffffffffff W/BufferQueueDump(14114): [ImageReader-720x1464f1m3-14114-0] [addBuffer] slot(1) acquired, seems to be abnormal, just update ... I/Choreographer(14114): Skipped 13 frames! The application may be doing too much work on its main thread. E/SchedPolicy(14114): set_timerslack_ns write failed: Operation not permitted
This is my android.xml file note am not displaying the key
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.location_viewer">
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>
<application
android:label="location_viewer"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="**API_KEY**"/>
</application>
</manifest>
This is the code where I am using the key?
class LocationHelper {
static getUsersLocation(
{required double? latitude, required double? longitude}) {
return 'https://maps.googleapis.com/maps/api/staticmap?center=$latitude,$longitude&zoom=16&size=600x300&maptype=roadmap&markers=color:blue%7Clabel:S%7C$latitude,$longitude&key=$apiKey1';
}
}
When I display a static image of the map it's working okay enter image description here But when I want to render the full map on the screen its just giving me a blank map with a blue overlay enter image description here