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

fix: add import typed_data in mobile_scanner_controller file because error about Uint8List during build #383

Conversation

taroooth
Copy link

Summary

In my environment, I got the following error when I tried to pub get ^3.0.0-beta.2 and build it, so I imported what I needed.

Launching lib/main.dart on Pixel 3a in debug mode...
lib/main.dart:1
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
: Error: 'Uint8List' isn't a type.
../…/src/mobile_scanner_controller.dart:283
            image: event['image'] as Uint8List?,
                                     ^^^^^^^^^
FAILURE: Build failed with an exception.

* Where:
Script '/Users/r/fvm/versions/3.0.4/packages/flutter_tools/gradle/flutter.gradle' line: 1156

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/Users/r/fvm/versions/3.0.4/bin/flutter'' finished with non-zero exit value 1

* 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 30s
Exception: Gradle task assembleDebug failed with exit code 1
Exited

flutter doctor

$ fvm flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel unknown, 3.0.4, on macOS 12.6 21G115 darwin-x64, locale ja-JP)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 13.3.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] VS Code (version 1.73.1)
[✓] Connected device (4 available)
    ! Error: iPhone (2) is busy: Fetching debug symbols for iPhone (2). Xcode will continue when iPhone (2) is finished. (code -10)
[✓] HTTP Host Availability

• No issues found!

@juliansteenbakker
Copy link
Owner

This is because you are running an outdated version of Flutter. I should update the minimum required flutter version to fix this, because otherwise the build proces will fail because if i add this import, it will generate a warning.

For now i suggest using the latest version of the Flutter Stable release, which is 3.3.9.

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

Successfully merging this pull request may close these issues.

None yet

2 participants