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

Execution failed for task ':qr_code_scanner:compileDebugKotlin'. --- while running flutter run #26

Closed niks-coder closed 4 months ago

niks-coder commented 1 year ago

Hi I am using the following version of flutter [√] Flutter (Channel stable, 3.0.5, on Microsoft Windows [Version 10.0.22000.795], locale en-IN) • Flutter version 3.0.5 at C:\src\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision f1875d570e (13 days ago), 2022-07-13 11:24:16 -0700 • Engine revision e85ea0e79c • Dart version 2.17.6 • DevTools version 2.12.2

When I am running flutter run I am getting the following error. e: C:\Users\admin\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\qr_code_scanner-0.6.1\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: C:\Users\admin\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\qr_code_scanner-0.6.1\android\src\main\kotlin\net\touchcapture\qr\flutterqr\QRView.kt: (217, 26): Null can not be a value of a non-null type String e: C:\Users\admin\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\qr_code_scanner-0.6.1\android\src\main\kotlin\net\touchcapture\qr\flutterqr\QRView.kt: (248, 26): Null can not be a value of a non-null type String e: C:\Users\admin\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\qr_code_scanner-0.6.1\android\src\main\kotlin\net\touchcapture\qr\flutterqr\QRView.kt: (301, 5): 'onRequestPermissionsResult' overrides nothing e: C:\Users\admin\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\qr_code_scanner-0.6.1\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: C:\Users\admin\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\qr_code_scanner-0.6.1\android\src\main\kotlin\net\touchcapture\qr\flutterqr\QRViewFactory.kt: (13, 5): 'create' overrides nothing

FAILURE: Build failed with an exception.

BUILD FAILED in 20s

Can anyone let me know how to resolve this?

rajSilikon commented 1 year ago

I am also experiencing the same issue.

Have you managed to solve this issue?

niks-coder commented 1 year ago

Yes i have updated qr_code_scanner version. This solved the issue

xOldeVx commented 6 months ago

Still same problem after upgrade to compileSdkVersion 34 targetSdkVersion 34 And gradle 7.4.2

image
ybeshkarov commented 5 months ago

I'm not able to get this error with the Flutter 3.19.0 • channel stable • https://github.com/flutter/flutter.git Android with API 34 and the latest code from the master branch.

@xOldeVx could you please give more details about your environment?

ybeshkarov commented 4 months ago

Closed as no response.