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

Execution failed for task ':majascan:compileDebugKotlin'. #40

Open
salamander24 opened this issue Mar 3, 2021 · 5 comments
Open

Execution failed for task ':majascan:compileDebugKotlin'. #40

salamander24 opened this issue Mar 3, 2021 · 5 comments

Comments

@salamander24
Copy link

Hello, with Majascan 0.4.0 I get following error while compiling:
Any clue what it could be?

Running Gradle task 'assembleDebug'...
e: C:\Users\admin\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\majascan-0.4.0\android\src\main\kotlin\com\djgeo\majascan\g_scanner\PermissionUtil.kt: (55, 28): Type mismatch: inferred type is String? but String was expected
e: C:\Users\admin\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\majascan-0.4.0\android\src\main\kotlin\com\djgeo\majascan\g_scanner\QrCodeScannerActivity.kt: (72, 29): Type mismatch: inferred type is String? but String was expected
e: C:\Users\admin\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\majascan-0.4.0\android\src\main\kotlin\com\djgeo\majascan\g_scanner\QrCodeScannerActivity.kt: (87, 69): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type String?

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':majascan: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 1m 26s
Exception: Gradle task assembleDebug failed with exit code 1

@HeikoMueller
Copy link

Same here. Tried to set Flutter SDK to non nullable version to ">=2.12.0 <3.0.0" without success. Any other suggestions?

@n0m4dz
Copy link

n0m4dz commented Mar 24, 2021

Same issue here too. Any solutions?

@kuhnroyal
Copy link
Contributor

Same here. Tried to set Flutter SDK to non nullable version to ">=2.12.0 <3.0.0" without success. Any other suggestions?

This has nothing to do with Dart null-safety. The error is about Kotlin code.

This started happening for me after updating to 'com.android.tools.build:gradle:4.1.0' - can anyone confirm this?

@kuhnroyal
Copy link
Contributor

#42 probably fixes these problems, it also addresses NNBD migration

@jmsquillaro
Copy link

@maja0270558 Any update on this? Sadly this is causing this great package to be not usable. It seems #42 as @kuhnroyal mentioned would fix this issue. Please let me know if this can be fixed extremely soon. Thank you!

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

5 participants