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

Card Scanner Issue #55

Open
daniyalpatel opened this issue Aug 8, 2021 · 3 comments
Open

Card Scanner Issue #55

daniyalpatel opened this issue Aug 8, 2021 · 3 comments

Comments

@daniyalpatel
Copy link

I have added the pre release version of Card Scanner like this card_scanner: ^1.0.1-prerelease but the project is not compiling successfully and throws an exception. My flutter version is 2.2.3 and dart version is 2.13.4.
The first exception was thrown is related to min sdk version but then I changed the minSdkVersion 21 in android -> app ->src -> builde.gradle & as well as the targetSdkVersion is 30. After that I again tried to run the project but it throws an exception given below.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':card_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 49s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)


The version details are as followed.

android {
compileSdkVersion 30

sourceSets {
    main.java.srcDirs += 'src/main/kotlin'
}

defaultConfig {
    // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
    applicationId "com.example.card_scanner_demo"
    minSdkVersion 21
    targetSdkVersion 30
    versionCode flutterVersionCode.toInteger()
    versionName flutterVersionName
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}

buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}

dependencies {
    classpath 'com.android.tools.build:gradle:4.1.0'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}

}

Flutter 2.2.3
Dart 2.13.4

Please help me out I've tried everything but no use.

Thanks

@ZoraizEjaz
Copy link

I have added the pre release version of Card Scanner like this card_scanner: ^1.0.1-prerelease but the project is not compiling successfully and throws an exception. My flutter version is 2.2.3 and dart version is 2.13.4.
The first exception was thrown is related to min sdk version but then I changed the minSdkVersion 21 in android -> app ->src -> builde.gradle & as well as the targetSdkVersion is 30. After that I again tried to run the project but it throws an exception given below.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':card_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 49s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

The version details are as followed.

android {
compileSdkVersion 30

sourceSets {
    main.java.srcDirs += 'src/main/kotlin'
}

defaultConfig {
    // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
    applicationId "com.example.card_scanner_demo"
    minSdkVersion 21
    targetSdkVersion 30
    versionCode flutterVersionCode.toInteger()
    versionName flutterVersionName
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}

buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}

dependencies {
    classpath 'com.android.tools.build:gradle:4.1.0'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}

}

Flutter 2.2.3
Dart 2.13.4

Please help me out I've tried everything but no use.

Thanks
I have faced the same issue. I resolved this by upgrading the kotlin version.
ext.kotlin_version = '1.4.32'

@daniyalpatel
Copy link
Author

I have added the pre release version of Card Scanner like this card_scanner: ^1.0.1-prerelease but the project is not compiling successfully and throws an exception. My flutter version is 2.2.3 and dart version is 2.13.4.
The first exception was thrown is related to min sdk version but then I changed the minSdkVersion 21 in android -> app ->src -> builde.gradle & as well as the targetSdkVersion is 30. After that I again tried to run the project but it throws an exception given below.
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':card_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 49s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
The version details are as followed.
android {
compileSdkVersion 30

sourceSets {
    main.java.srcDirs += 'src/main/kotlin'
}

defaultConfig {
    // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
    applicationId "com.example.card_scanner_demo"
    minSdkVersion 21
    targetSdkVersion 30
    versionCode flutterVersionCode.toInteger()
    versionName flutterVersionName
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}

dependencies {
    classpath 'com.android.tools.build:gradle:4.1.0'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}

}
Flutter 2.2.3
Dart 2.13.4
Please help me out I've tried everything but no use.
Thanks
I have faced the same issue. I resolved this by upgrading the kotlin version.
ext.kotlin_version = '1.4.32'

I tried this but still getting same error even I tried the same ext.kotlin version as well that's used in the github demo project but nothing happened and got the same exception.

C:\src\flutter.pub-cache\hosted\pub.dartlang.org\card_scanner-1.0.1-prerelease\android\src\main\java\com\nateshmbhat\card_scanner\CardScannerCameraActivity.kt: (50, 26): Type mismatch: inferred type is CardScannerOptions? but CardScannerOptions was expected
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\card_scanner-1.0.1-prerelease\android\src\main\java\com\nateshmbhat\card_scanner\scanner_core\models\CardScannerOptions.kt: (27, 44): Type mismatch: inferred type is ArrayList<String!>? but List was expected
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\card_scanner-1.0.1-prerelease\android\src\main\java\com\nateshmbhat\card_scanner\scanner_core\models\CardScannerOptions.kt: (33, 45): Type mismatch: inferred type is ArrayList<String!>? but List was expected

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':card_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 1m 43s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

@right7ctrl
Copy link

same here, any solution?

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

3 participants