我现在不可能在华为设备上测试我的应用程序,所以我试着在Android仿真器上进行测试,但是我得到了这个错误,我不知道是因为它不是华为设备还是其他设备?
Unhandled Exception: PlatformException(error, java.lang.IllegalStateException: Trying to create a platform view of unregistered type: com.huawei.hms.flutter.map/map
发布于 2022-06-21 11:33:35
此错误似乎是颤振插件加载问题。您需要按照指南检查项目中的配置:https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-Guides/integrating-sdk-0000001050188606
如果要在非华为设备上使用Map,则需要在"huawei-map插件“中的build.gradle文件中添加以下依赖项(请使用最新插件):
implementation 'com.huawei.hms:maps-basic:6.4.1.300'如下所示:
dependencies {
implementation 'com.huawei.hms:maps:6.4.1.300'
implementation 'com.huawei.hms:maps-basic:6.4.1.300'
implementation 'androidx.interpolator:interpolator:1.0.0' }https://stackoverflow.com/questions/72698207
复制相似问题