Reputation: 2861
i faced an error when using google_maps_flutter: ^0.0.3+3
plugin with flutter.
i done all requirement for using google map both with android manifest
or ios runner
.
this is my code for map
GoogleMap(onMapCreated: (GoogleMapController controller) {},
options: GoogleMapOptions(
cameraPosition: CameraPosition(
target: LatLng(36.382013, 43.143249),
),
mapType: MapType.normal,
),
),
and error is like this:
W/ResourcesManager( 9743): getTopLevelResources: /data/app/com.example.mis-2/base.apk / 1.0 running in com.example.mis rsrc of package null
I/zzbz ( 9743): Making Creator dynamically
I/DynamiteModule( 9743): Considering local module com.google.android.gms.maps_dynamite:0 and remote module com.google.android.gms.maps_dynamite:221
I/DynamiteModule( 9743): Selected remote version of com.google.android.gms.maps_dynamite, version >= 221
W/ResourcesManager( 9743): getTopLevelResources: /data/app/com.google.android.gms-4/base.apk / 1.0 running in com.example.mis rsrc of package null
W/ResourcesManager( 9743): Asset path '/system/framework/com.android.media.remotedisplay.jar' does not exist or contains no resources.
W/ResourcesManager( 9743): Asset path '/system/framework/com.android.location.provider.jar' does not exist or contains no resources.
D/ApplicationPackageManager( 9743): getResourcesForApplication com.google.android.gms got new pi = android.app.LoadedApk@67b11be
W/ResourcesManager( 9743): getTopLevelResources: /data/data/com.google.android.gms/app_chimera/m/00000015/MapsDynamite.apk / 1.0 running in com.example.mis rsrc of package null
I/art ( 9743): Background partial concurrent mark sweep GC freed 1553(129KB) AllocSpace objects, 0(0B) LOS objects, 24% free, 5MB/6MB, paused 9.674ms total 32.165ms
D/ApplicationPackageManager( 9743): getResourcesForApplication com.google.android.gms got new pi = android.app.LoadedApk@67b11be
W/ResourcesManager( 9743): getTopLevelResources: /data/data/com.google.android.gms/app_chimera/m/00000015/MapsDynamite.apk / 1.0 running in com.example.mis rsrc of package null
I/Google Maps Android API( 9743): Google Play services client version: 12451000
I/Google Maps Android API( 9743): Google Play services package version: 14799007
D/AbsListView( 9743): Get MotionRecognitionManager
E/MotionRecognitionManager( 9743): mSContextService = null
E/MotionRecognitionManager( 9743): motionService = com.samsung.android.motion.IMotionRecognitionService$Stub$Proxy@297b9bff
I/art ( 9743): Background sticky concurrent mark sweep GC freed 12347(981KB) AllocSpace objects, 2(32KB) LOS objects, 14% free, 5MB/6MB, paused 5.401ms total 46.386ms
W/ContextImpl( 9743): Failed to ensure directory: /storage/extSdCard/Android/data/com.example.mis/cache
W/System.err( 9743): mkdir failed: EEXIST (File exists) : /storage/emulated/0/Android/data/com.example.mis/cache/debug
W/System.err( 9743): mkdir failed: EEXIST (File exists) : /storage/emulated/0/Android/data/com.example.mis/cache
I/System.out( 9743): (HTTPLog)-Static: isSBSettingEnabled false
I/System.out( 9743): (HTTPLog)-Static: isShipBuild true
I/System.out( 9743): (HTTPLog)-Thread-1019-403128043: SmartBonding Enabling is false, SHIP_BUILD is true, log to file
is false, DBG is false
I/System.out( 9743): (HTTPLog)-Thread-1019-403128043: SMARTBONDING_FEATURE_ENABLED is false
I/System.out( 9743): (HTTPLog)-Static: isSBSettingEnabled false
I/art ( 9743): Background partial concurrent mark sweep GC freed 1110(81KB) AllocSpace objects, 0(0B) LOS objects, 24% free, 6MB/8MB, paused 10.284ms total 41.198ms
I/System.out( 9743): KnoxVpnUidStorageknoxVpnSupported API value returned is false
D/PhoneWindow( 9743): *FMB* installDecor mIsFloating : false
D/PhoneWindow( 9743): *FMB* installDecor flags : -2139028216
E/GoogleMapController( 9743): Cannot enable MyLocation layer as location permissions are not granted
D/PhoneWindow( 9743): *FMB* isFloatingMenuEnabled mFloatingMenuBtn : null
D/PhoneWindow( 9743): *FMB* isFloatingMenuEnabled return false
I/System.out( 9743): KnoxVpnUidStorageknoxVpnSupported API value returned is false
I/System.out( 9743): (HTTPLog)-Static: isSBSettingEnabled false
I/System.out( 9743): (HTTPLog)-Static: isSBSettingEnabled false
I/System.out( 9743): KnoxVpnUidStorageknoxVpnSupported API value returned is false
I/System.out( 9743): KnoxVpnUidStorageknoxVpnSupported API value returned is false
W/DynamiteModule( 9743): Local module descriptor class for com.google.android.gms.googlecertificates not found.
I/DynamiteModule( 9743): Considering local module com.google.android.gms.googlecertificates:0 and remote module com.google.android.gms.googlecertificates:4
I/DynamiteModule( 9743): Selected remote version of com.google.android.gms.googlecertificates, version >= 4
D/ApplicationPackageManager( 9743): getResourcesForApplication com.google.android.gms got new pi = android.app.LoadedApk@67b11be
W/ResourcesManager( 9743): getTopLevelResources: /data/data/com.google.android.gms/app_chimera/m/00000014/GoogleCertificates.apk / 1.0 running in com.example.mis rsrc of package null
D/ApplicationPackageManager( 9743): getResourcesForApplication com.google.android.gms got new pi = android.app.LoadedApk@67b11be
W/ResourcesManager( 9743): getTopLevelResources: /data/data/com.google.android.gms/app_chimera/m/00000014/GoogleCertificates.apk / 1.0 running in com.example.mis rsrc of package null
Upvotes: 4
Views: 7114
Reputation: 93
In my case, it was due to the missing permission in AndroidManifest.xml
Adding the following permission resolved my issue.
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
If you are working on an emulator, make sure your emulator has Google Play Services.
Upvotes: 1
Reputation: 1725
I had the same problem. What helps to me is:
AnroidManifest.xml
in application section next line <uses-library android:name="org.apache.http.legacy" android:required="false"/>
Upvotes: 6