Reputation: 508
I don't have possibility right now to test my app on Huawei device so I tried to do it on Android Studio emulator but I am getting this error and I don't know it's because it is not Huawei device or it is something else?
Unhandled Exception: PlatformException(error, java.lang.IllegalStateException: Trying to create a platform view of unregistered type: com.huawei.hms.flutter.map/map
Upvotes: 1
Views: 281
Reputation: 51
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' }
Upvotes: 2