flutter_thingsboard_app icon indicating copy to clipboard operation
flutter_thingsboard_app copied to clipboard

Can't run in Flutter 3.0.0

Open jiekechoo opened this issue 2 years ago • 5 comments

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.

  • What went wrong: Execution failed for task ':qr_code_scanner:compileDebugKotlin'.

Compilation error. See log for more details

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

jiekechoo avatar May 14 '22 01:05 jiekechoo

me too facing the same problem

rudian avatar May 14 '22 11:05 rudian

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 avatar Jun 04 '22 15:06 IoTThinks

@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.

IoTThinks avatar Jun 04 '22 15:06 IoTThinks

@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.

jiekechoo avatar Jun 04 '22 23:06 jiekechoo

@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.

IoTThinks avatar Jun 07 '22 02:06 IoTThinks