mintware-de / flutter_barcode_reader

A flutter plugin for reading 2D barcodes and QR codes.
MIT License
628 stars 463 forks source link

App crashes on Calling BarcodeScanner.scan() when in release mode #154

Closed harpreetseera closed 4 years ago

harpreetseera commented 4 years ago

The plugin is working Fine when app runs in debug mode, but when in release mode as soon as the function call to scan the barcode/qrcode is made,the app crashes.(it does not even prompt for camera permission). I am using Flutter version : 1.9.1+hotfix.4 barcode_scan :1.0.0

harpreetseera commented 4 years ago

Found out the issue.Actually I was not adding the kotlin dependency in the app level and project level build.gradle file as documented below.

Edit your project-level build.gradle file to look like this:

buildscript { ext.kotlin_version = '1.3.21' dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } }

Edit your app-level build.gradle file to look like this:

apply plugin: 'kotlin-android' dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" }