Getting the error "Trying to create a platform view of unregistered type: com.huawei.hms.flutter.map/map" when using huawei_map for Flutter

315

Thanks for your feedback, As confirmed by the team, the map kit does not support Flutter 2.0 by now. But it is planned to launch map kit plugins for Flutter 2.0 around September,and i will let you know when it's released.

Share:
315
Stefan Zeuch
Author by

Stefan Zeuch

Updated on December 02, 2022

Comments

  • Stefan Zeuch
    Stefan Zeuch over 1 year

    Getting the error "Trying to create a platform view of unregistered type: com.huawei.hms.flutter.map/map" when using huawei_map for Flutter

    Component:

    HuaweiMap(initialCameraPosition: CameraPosition(target: _center, zoom: _zoom))
    

    Device: Huawei P40 Lite

    All required setup has been completed correctly.

    E/flutter (13684):      at io.flutter.plugin.platform.PlatformViewsController$1.createVirtualDisplayForPlatformView(PlatformViewsController.java:192)
    E/flutter (13684):      at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:104)
    E/flutter (13684):      at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:59)
    E/flutter (13684):      at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
    E/flutter (13684):      at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
    E/flutter (13684):      at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:818)
    E/flutter (13684):      at android.os.MessageQueue.nativePollOnce(Native Method)
    E/flutter (13684):      at android.os.MessageQueue.next(MessageQueue.java:363)
    E/flutter (13684):      at android.os.Looper.loop(Looper.java:176)
    E/flutter (13684):      at android.app.ActivityThread.main(ActivityThread.java:8349)
    E/flutter (13684):      at java.lang.reflect.Method.invoke(Native Method)
    E/flutter (13684):      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
    E/flutter (13684):      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)
    E/flutter (13684): , null, null)
    E/flutter (13684): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:597:7)
    E/flutter (13684): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:158:18)
    E/flutter (13684): <asynchronous suspension>
    E/flutter (13684): #2      TextureAndroidViewController._sendCreateMessage (package:flutter/src/services/platform_views.dart:1043:18)
    E/flutter (13684): <asynchronous suspension>
    E/flutter (13684): #3      AndroidViewController.create (package:flutter/src/services/platform_views.dart:748:5)
    E/flutter (13684): <asynchronous suspension>
    E/flutter (13684): #4      RenderAndroidView._sizePlatformView (package:flutter/src/rendering/platform_view.dart:193:7)
    E/flutter (13684): <asynchronous suspension>
    E/flutter (13684):```
    
    • zhangxaochen
      zhangxaochen almost 3 years
      hi@Stefan Zeuch,may i ask if you're using a flutter 1.0 or 2.0?
    • Jonathan Ixcayau
      Jonathan Ixcayau almost 3 years
      Have you tried sending mapType?
    • Stefan Zeuch
      Stefan Zeuch almost 3 years
      @shirley flutter 2.0
    • Stefan Zeuch
      Stefan Zeuch almost 3 years
      @JonathanIxcayau I have yes
    • zhangxaochen
      zhangxaochen almost 3 years
      @StefanZeuch,According to the team, the map kit does not support Flutter 2.0 by now. :(
    • Stefan Zeuch
      Stefan Zeuch almost 3 years
      @shirley ETA on supporting it?
    • zhangxaochen
      zhangxaochen almost 3 years
      @StefanZeuch yes,pls kindly see my answer below.