aloisdeniel / flutter_geocoder

Flutter plugin for forward and reverse geocoding

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

flutter 1.7.8+hotfix.3 on stable channel | geocoder: 0.1.2

opened this issue · comments

I have updated flutter 1.7.8+hotfix.3 on stable channel

Caused by: java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: AsyncTask #2
E/AndroidRuntime(10984): at io.flutter.embedding.engine.FlutterJNI.ensureRunningOnMainThread(FlutterJNI.java:794)
E/AndroidRuntime(10984): at io.flutter.embedding.engine.FlutterJNI.invokePlatformMessageResponseCallback(FlutterJNI.java:727)
E/AndroidRuntime(10984): at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:140)
E/AndroidRuntime(10984): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.success(MethodChannel.java:225)
E/AndroidRuntime(10984): at com.aloisdeniel.geocoder.GeocoderPlugin$1.doInBackground(GeocoderPlugin.java:79)
E/AndroidRuntime(10984): at com.aloisdeniel.geocoder.GeocoderPlugin$1.doInBackground(GeocoderPlugin.java:72)
E/AndroidRuntime(10984): at android.os.AsyncTask$2.call(AsyncTask.java:333)
E/AndroidRuntime(10984): at java.util.concurrent.FutureTask.run(FutureTask.java:266)
E/AndroidRuntime(10984): ... 4 more

How to fix this issue

Thanks

  • 1, the same crash (in example too)

I'm facing this isso too. It worked on v1.5.4.

a PR is waiting for being merged here #15

same crash

Found this commit in another thread. Solved for me.
Put this on pubspec.yaml:

geocoder:
    git:
      url: https://github.com/Eimji/flutter_geocoder.git
      ref: bc34cfe473bfd1934fe098bb7053248b75200241

@rrnicolay Thanks, It is working fine