CodingWithTashi / simple_barcode_scanner

Simple Barcode Scanner
https://pub.dev/packages/simple_barcode_scanner
MIT License
44 stars 60 forks source link

android build crashes with flutter 3.24.0 #63

Open OliHoch opened 1 month ago

OliHoch commented 1 month ago

With flutter 3.24.0 "flutter build apk" crashes with every flutter application using simple_barcode_scanner, even with newly created projects (flutter create ), as soon as simple_barcode_scanner is in pubspec.yaml.

Error message:


FAILURE: Build failed with an exception.

Environment:


flutter doctor -v [√] Flutter (Channel stable, 3.24.0, on Microsoft Windows [Version 10.0.22631.3880], locale de-DE) • Flutter version 3.24.0 on channel stable at C:\prog\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 80c2e84975 (10 days ago), 2024-07-30 23:06:49 +0700 • Engine revision b8800d88be • Dart version 3.5.0 • DevTools version 2.37.2

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at C:\Users\Admin\AppData\Local\Android\Sdk • Platform android-34, build-tools 30.0.3 • ANDROID_SDK_ROOT = C:\Users\Admin\AppData\Local\Android\Sdk • Java binary at: C:\prog\Android\Android Studio\jbr\bin\java • Java version OpenJDK Runtime Environment (build 17.0.10+0--11609105) • All Android licenses accepted.

[√] Chrome - develop for the web • CHROME_EXECUTABLE = C:\prog\PortableApps\GoogleChromePortable\GoogleChromePortable.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.8.6) • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community • Visual Studio Community 2022 version 17.8.34525.116 • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2024.1) • Android Studio at C:\prog\Android\Android Studio • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.10+0--11609105)

[√] IntelliJ IDEA Community Edition (version 2021.3) • IntelliJ at C:\prog\JetBrains\IntelliJ IDEA Community Edition 2020.3.3 • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart

[√] Connected device (3 available) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22631.3880] • Chrome (web) • chrome • web-javascript • Google Chrome 127.0.6533.89 • Edge (web) • edge • web-javascript • Microsoft Edge 127.0.2651.86

[√] Network resources • All expected network resources are available.

• No issues found!

OliHoch commented 1 month ago

Probably connected with https://github.com/flutter/flutter/issues/153281 - the problem in 3.24.0 seems to affect multiple plugins. It is recommended there to upgrade compileSdkVersion to 34, as this has resolved the issue in https://github.com/pr0gramista/charset_converter/issues/40#issuecomment-2282932050.

robsonoduarte commented 3 weeks ago

this plugin is a wrapper of flutter_barcode_scanner, which was last updated a 3 years ago :cry: this works for my build :pray: