简体   繁体   中英

Can I launch Huawei Map SDK on non-Huawei device?

我现在无法在华为设备上测试我的应用程序,所以我尝试在 Android Studio 模拟器上进行测试,但我收到此错误,我不知道这是因为它不是华为设备还是其他设备?

Unhandled Exception: PlatformException(error, java.lang.IllegalStateException: Trying to create a platform view of unregistered type: com.huawei.hms.flutter.map/map

This error seems like flutter plugin loading problem. You need to follow the guide to check the configuration in your project: https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-Guides/integrating-sdk-0000001050188606

If you want to use Map on non-Huawei device, you need to add the following dependency in build.gradle file in "huawei-map plugin"(Please use the latest plugin):

implementation 'com.huawei.hms:maps-basic:6.4.1.300'

like below:

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' }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM