wildfirechat / wfc_flutter_plugins

野火flutter插件,包含即时通讯和实时音视频插件
Other
35 stars 26 forks source link

集成 imclient 后,android端定位等权限有冲突 MissingPluginException PlatformException #73

Closed SummerZZ100 closed 10 months ago

SummerZZ100 commented 10 months ago

集成 imclient 后,android端定位等权限有冲突。调用定位,本地存储 都会奔溃

E/flutter ( 3064): [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null)
E/flutter ( 3064):
I/om.zxs.moca_on( 3064): ProcessProfilingInfo new_methods=1444 is saved saved_to_disk=1 resolve_classes_delay=8000

[ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: MissingPluginException(No implementation found for method checkPermissionStatus on channel flutter.baseflow.com/permissions/methods)

imndx commented 10 months ago

这应当不是我们插件的问题,这个报错,也不是我们插件,你再查一下:

[ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: MissingPluginException(No implementation found for method checkPermissionStatus on channel flutter.baseflow.com/permissions/methods)
imndx commented 10 months ago

FYI:https://github.com/Baseflow/flutter-permission-handler/issues/586

SummerZZ100 commented 10 months ago

现在是 我引入你们插件就会报这个错。不引入程序运行非常正常

SummerZZ100 commented 10 months ago

感觉你们这个Flutter插件有好多问题 能不能用 😂

imndx commented 10 months ago

能用的,很多客户都在用的。

要不,请你做一个最小能复现这个问题的 demo,然后我们调试下。

liaovq commented 10 months ago

同样的问题

imndx commented 10 months ago

同样的问题

是集成的问题,看下 readme 的说明

liaovq commented 10 months ago

同样的问题

是集成的问题,看下 readme 的说明

看了几十遍了,上面提到的该配的都配了

imndx commented 10 months ago

特别关注这部分,如果确认的话,附上日志,我们看下

   dependencies {

     // 将path_to_android_xxx_aars 替换成实际路径,可以使用相对路径,但一定要保证路径是正确的;路径不对的话,会报 ClassNotFoundException
     // wfc dep start

     // 根据实际需要,引入aar

     implementation fileTree(dir: "${path_to_android_client_aars}", include: ["*.aar"])
     implementation fileTree(dir: "${path_to_android_uikit_aars}", include: ["*.aar"])
     //implementation fileTree(dir: "${path_to_android_moment_aars}", include: ["*.aar"])
     //implementation fileTree(dir: "${path_android_ptt_aars}", include: ["*.aar"])

     // wfc dep end
 }
liaovq commented 10 months ago

dependencies { // wfc kit start implementation fileTree(dir: "../../android_uikit_aars", include: [".aar"]) implementation fileTree(dir: "../../android_client_aars", include: [".aar"]) implementation fileTree(dir: "../../android_moment_aars", include: ["*.aar"]) // wfc kit end }

这部分配置没有问题,项目已经跑很久了,就是因为更新了 sdk 后,几乎所有插件都在报 Unable to establish connection on channel,最终定位到你们 https://github.com/wildfirechat/wfc_flutter_plugins/commit/ba713301de2177b86e9e280f1b6eab96cdc209e7 ,这个改动中的 WfcUIKit.getWfcUIKit().setEnableNativeNotification(false);这一行,把这一行去掉之后一切正常,但是在你们 example 里没有这个问题

liaovq commented 10 months ago

和你们 example 对比配置,找了两天了,没看到哪里有什么不同

imndx commented 10 months ago

那你更新一下那些aar文件试下

liaovq commented 10 months ago

可以了,更新的时候这里漏掉了,谢谢