simple_barcode_scanner icon indicating copy to clipboard operation
simple_barcode_scanner copied to clipboard

android build crashes with flutter 3.24.0

Open OliHoch opened this issue 1 year ago • 1 comments

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.

  • What went wrong: Execution failed for task ':flutter_barcode_scanner:verifyReleaseResources'.

A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action Android resource linking failed ERROR:<project_path>\build\flutter_barcode_scanner\intermediates\merged_res\release\values\values.xml:6135: AAPT: error: resource android:attr/lStar not found


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 avatar Aug 09 '24 17:08 OliHoch

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.

OliHoch avatar Aug 14 '24 07:08 OliHoch

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

robsonoduarte avatar Aug 22 '24 02:08 robsonoduarte

Yea, Issue caused by flutter_barcode_scanner, planning to upgrade soon. closing the the issue now feel free to reopen if issue cause from simple_barcode_scanner

CodingWithTashi avatar Oct 03 '24 18:10 CodingWithTashi