thingsboard / flutter_thingsboard_app

ThingsBoard Mobile Application
https://thingsboard.io/products/mobile/
BSD 3-Clause "New" or "Revised" License
208 stars 155 forks source link

Can't run in Flutter 3.0.0 #24

Closed jiekechoo closed 5 months ago

jiekechoo commented 2 years ago

e: /Users/jiekechoo/devel/flutterSDK3/.pub-cache/hosted/pub.flutter-io.cn/qr_code_scanner-0.5.2/android/src/main/kotlin/net/touchcapture/qr/flutterqr/QRView.kt: (23, 1): Class 'QRView' is not abstract and does not implement abstract member public abstract fun onRequestPermissionsResult(p0: Int, p1: Array<(out) String!>, p2: IntArray): Boolean defined in io.flutter.plugin.common.PluginRegistry.RequestPermissionsResultListener e: /Users/jiekechoo/devel/flutterSDK3/.pub-cache/hosted/pub.flutter-io.cn/qr_code_scanner-0.5.2/android/src/main/kotlin/net/touchcapture/qr/flutterqr/QRView.kt: (214, 26): Null can not be a value of a non-null type String e: /Users/jiekechoo/devel/flutterSDK3/.pub-cache/hosted/pub.flutter-io.cn/qr_code_scanner-0.5.2/android/src/main/kotlin/net/touchcapture/qr/flutterqr/QRView.kt: (245, 26): Null can not be a value of a non-null type String e: /Users/jiekechoo/devel/flutterSDK3/.pub-cache/hosted/pub.flutter-io.cn/qr_code_scanner-0.5.2/android/src/main/kotlin/net/touchcapture/qr/flutterqr/QRView.kt: (273, 5): 'onRequestPermissionsResult' overrides nothing e: /Users/jiekechoo/devel/flutterSDK3/.pub-cache/hosted/pub.flutter-io.cn/qr_code_scanner-0.5.2/android/src/main/kotlin/net/touchcapture/qr/flutterqr/QRViewFactory.kt: (10, 1): Class 'QRViewFactory' 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: /Users/jiekechoo/devel/flutterSDK3/.pub-cache/hosted/pub.flutter-io.cn/qr_code_scanner-0.5.2/android/src/main/kotlin/net/touchcapture/qr/flutterqr/QRViewFactory.kt: (13, 5): 'create' overrides nothing

FAILURE: Build failed with an exception.

reference : [BUG] Can't run in flutter 3 #532

rudian commented 2 years ago

me too facing the same problem

IoTThinks commented 2 years ago

Over here says sdk: ">=2.12.0 <3.0.0" https://github.com/thingsboard/flutter_thingsboard_app/blob/master/pubspec.yaml#L9

However, 2.12.x doesnt have any stable versions. Only beta version has 2.12.x. https://docs.flutter.dev/development/tools/sdk/releases

IoTThinks commented 2 years ago

@jiekechoo So we need to change qr_code_scanner: ^0.6.1 to qr_code_scanner: ^1.0.0? Have you made it working? Thanks a lot.

jiekechoo commented 2 years ago

@jiekechoo So we need to change qr_code_scanner: ^0.6.1 to qr_code_scanner: ^1.0.0? Have you made it working? Thanks a lot.

not yet. I still use Flutter 2 for development. I have two develop environment , use linux command ln -s change Flutter 2 or 3 for build specific apps.

IoTThinks commented 2 years ago

@jiekechoo So we need to change qr_code_scanner: ^0.6.1 to qr_code_scanner: ^1.0.0?

Have you made it working? Thanks a lot.

This approach works. I can run the app on Flutter 3 now. Have some warnings during compilation btw.