zyzdev / flutter_street_view

10 stars 29 forks source link

Build error for Android #13

Closed hukusuke1007 closed 2 years ago

hukusuke1007 commented 2 years ago

Flutter 3.0.0 Dart 2.17.0 flutter_google_street_view: ^2.2.7

Error Log

e: /flutter/.pub-cache/hosted/pub.dartlang.org/flutter_google_street_view-2.2.7/android/src/main/kotlin/zyz/flutter/plugin/flutter_google_street_view/FlutterGoogleStreetViewFactory.kt: (11, 1): Class 'FlutterGoogleStreetViewFactory' is not abstract and does not implement abstract base class member public abstract fun create(p0: Context?, p1: Int, p2: Any?): PlatformView defined in io.flutter.plugin.platform.PlatformViewFactory
e: /flutter/.pub-cache/hosted/pub.dartlang.org/flutter_google_street_view-2.2.7/android/src/main/kotlin/zyz/flutter/plugin/flutter_google_street_view/FlutterGoogleStreetViewFactory.kt: (14, 5): 'create' overrides nothing
liorboyango commented 2 years ago

Same here

liorboyango commented 2 years ago

According to the error message, 'create' function in FlutterGoogleStreetViewFactory.kt does not override correctly - It looks like Context should nullable like so: override fun create(context: Context?, id: Int, args: Any?) while currently it is not: override fun create(context: Context, id: Int, args: Any?)

hukusuke1007 commented 2 years ago

Please https://github.com/zyzdev/flutter_street_view/pull/14

zyzdev commented 2 years ago

2.2.8-dev.1 support flutter 3.0.0. But the android meets problem https://github.com/zyzdev/flutter_street_view/issues/15. Suggest using flutter 2.10.0 if flutter 3.0.0 is not necessary.