lishuhao / sy_flutter_qiniu_storage

七牛云对象存储SDK,上传大文件,进度监听,取消上传
Other
70 stars 26 forks source link

这个插件在android 7.1上会报Methods marked with @UiThread must be executed on the main thread. Current thread: #7

Open kkrr6840 opened 5 years ago

kkrr6840 commented 5 years ago

E/AndroidRuntime(17610): java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: OkHttp https://uc.qbox.me/... E/AndroidRuntime(17610): at io.flutter.embedding.engine.FlutterJNI.ensureRunningOnMainThread(FlutterJNI.java:794) E/AndroidRuntime(17610): at io.flutter.embedding.engine.FlutterJNI.invokePlatformMessageResponseCallback(FlutterJNI.java:727) E/AndroidRuntime(17610): at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:140) E/AndroidRuntime(17610): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.success(MethodChannel.java:225) E/AndroidRuntime(17610): at plugin.storage.qiniu.flutter.isanye.cn.syflutterqiniustorage.SyFlutterQiniuStoragePlugin$1.complete(SyFlutterQiniuStoragePlugin.java:97) E/AndroidRuntime(17610): at com.qiniu.android.storage.UploadManager$2.onFailure(UploadManager.java:186) E/AndroidRuntime(17610): at com.qiniu.android.common.AutoZone$1.complete(AutoZone.java:98) E/AndroidRuntime(17610): at com.qiniu.android.http.Client$5.onFailure(Client.java:231) E/AndroidRuntime(17610): at okhttp3.RealCall$AsyncCall.execute(RealCall.java:161) E/AndroidRuntime(17610): at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) E/AndroidRuntime(17610): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) E/AndroidRuntime(17610): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) E/AndroidRuntime(17610): at java.lang.Thread.run(Thread.java:761)

beiger commented 4 years ago

七牛SDK的bug,自己把Android里面complete的回调放在主线程执行吧

chenxi2035 commented 4 years ago

我看了工程中的android依赖,还在用七牛7.3+库,烦请作者更新