Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SOLUTION PROVIDED INSIDE] Class 'QRView' is not abstract and does not implement abstract member @UiThread public abstract fun onMethodCall #6

Open
Tolga-FNT opened this issue Jul 9, 2019 · 1 comment

Comments

@Tolga-FNT
Copy link

Tolga-FNT commented Jul 9, 2019

e: /Users/omega/Flutter-Files/.pub-cache/hosted/pub.dartlang.org/last_qr_scanner-0.0.6/android/src/main/kotlin/com/example/last_qr_scanner/QRView.kt: (22, 1): Class 'QRView' is not abstract and does not implement abstract member @UiThread public abstract fun onMethodCall(@nonnull p0: MethodCall, @nonnull p1: MethodChannel.Result): Unit defined in io.flutter.plugin.common.MethodChannel.MethodCallHandler
e: /Users/omega/Flutter-Files/.pub-cache/hosted/pub.dartlang.org/last_qr_scanner-0.0.6/android/src/main/kotlin/com/example/last_qr_scanner/QRView.kt: (93, 5): 'onMethodCall' overrides nothing
e: /Users/omega/Flutter-Files/.pub-cache/hosted/pub.dartlang.org/last_qr_scanner-0.0.6/android/src/main/kotlin/com/example/last_qr_scanner/QRView.kt: (93, 14): Abstract function 'onMethodCall' in non-abstract class 'QRView'
e: /Users/omega/Flutter-Files/.pub-cache/hosted/pub.dartlang.org/last_qr_scanner-0.0.6/android/src/main/kotlin/com/example/last_qr_scanner/QRView.kt: (93, 14): A function 'onMethodCall' with body cannot be abstract

FAILURE: Build failed with an exception.

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

Compilation error. See log for more details

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1s

EDIT:

I fixed the issue by removing the question marks from this method:

override fun onMethodCall(call: MethodCall?, result: MethodChannel.Result?)

to this:

override fun onMethodCall(call: MethodCall, result: MethodChannel.Result)

Please provide a solution for this problem by changing your code.

@Tolga-FNT Tolga-FNT changed the title Class 'QRView' is not abstract and does not implement abstract member @UiThread public abstract fun onMethodCall [SOLUTION PROVIDED INSIDE] Class 'QRView' is not abstract and does not implement abstract member @UiThread public abstract fun onMethodCall Jul 9, 2019
@topseySuave
Copy link

Hello @Tolga-FNT, am getting the same error, but which method did you edit and on which file? where can I find it? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants