Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_MapboxMapState.onPlatformViewCreated The method 'call' was called on null. #446

Closed
MATTYGILO opened this issue Oct 29, 2020 · 5 comments
Closed
Labels

Comments

@MATTYGILO
Copy link

MATTYGILO commented Oct 29, 2020

I am using Flutter Mapbox version:
mapbox_gl: ^0.9.0

I came across this error:

[VERBOSE-2:shell.cc(210)] Dart Unhandled Exception: NoSuchMethodError: The method 'call' was called on null.
Receiver: null
Tried calling: call(), stack trace: #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1 _MapboxMapState.onPlatformViewCreated.. (package:mapbox_gl/src/mapbox_map.dart:226:70)
#2 _RootZone.runUnary (dart:async/zone.dart:1450:54)
#3 _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#4 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#5 Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#6 Future._completeWithValue (dart:async/future_impl.dart:529:5)
#7 Future._asyncCompleteWithValue. (dart:async/future_impl.dart:567:7)
#8 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#9 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)

@sspatari
Copy link

sspatari commented Nov 4, 2020

Same problem here

[VERBOSE-2:ui_dart_state.cc(177)] Unhandled Exception: NoSuchMethodError: The method 'call' was called on null.
Receiver: null
Tried calling: call()
#0      _MapboxMapState.onPlatformViewCreated.<anonymous closure>.<anonymous closure>
package:mapbox_gl/src/mapbox_map.dart:226
#1      _rootRunUnary (dart:async/zone.dart:1198:47)
#2      _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#3      _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#4      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#5      Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#6      Future._completeWithValue (dart:async/future_impl.dart:529:5)
#7      Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:567:7)
#8      _rootRun (dart:async/zone.dart:1190:13)
#9      _CustomZone.run (dart:async/zone.dart:1093:19)
#10     _CustomZone.runGuarded (dart:async/zone.dart:997:7)
#11     _CustomZone.bindCallbackGuarded.<anonymous <…>

@sspatari
Copy link

sspatari commented Nov 5, 2020

I solved this by setting onStyleLoadedCallback to and empty method:
image

@sspatari
Copy link

sspatari commented Nov 5, 2020

@tobrun What do you think if I create a pull request to set this as default if it is not passed manually?

@mirshahbazi
Copy link

This error because you use the minSdkVersion in android under the 20.
set minSdkVersion 20 in build.gradle file.

@stale
Copy link

stale bot commented Jan 14, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 14, 2022
@stale stale bot closed this as completed Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants