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

[BUG] [FLUTTER 1.25 & 1.26] Crash when building QRView #186

Closed
bdevay opened this issue Dec 20, 2020 · 1 comment
Closed

[BUG] [FLUTTER 1.25 & 1.26] Crash when building QRView #186

bdevay opened this issue Dec 20, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@bdevay
Copy link

bdevay commented Dec 20, 2020

Describe the bug
Simply copied your example into my project and tried to navigate to the barcode scanner widget. It reaches the

@override
  Widget build(BuildContext context){}

but crashes in

Widget _buildQrView(BuildContext context) {}

when it tries to build the QRView.

Flutter information
[√] Flutter (Channel dev, 1.26.0-1.0.pre, on Microsoft Windows [Version 10.0.19042.685], locale en-US)
• Flutter version 1.26.0-1.0.pre at C:\Flutter\SDK\flutter
• Framework revision 63062a6443 (6 days ago), 2020-12-13 23:19:13 +0800
• Engine revision 4797b06652
• Dart version 2.12.0 (build 2.12.0-141.0.dev)

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at C:\Android\Sdk
• Platform android-30, build-tools 30.0.3
• ANDROID_HOME = C:\Android\Sdk
• ANDROID_SDK_ROOT = C:\Android\Sdk
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.

[√] Android Studio (version 4.1.0)
• Android Studio at C:\Program Files\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 1.8.0_242-release-1644-b01)

[√] Connected device (1 available)
• motorola one action (mobile) • 10.0.0.7:5555 • android-arm64 • Android 10 (API 29)

• No issues found!
Process finished with exit code 0

Device (please complete the following information):

  • Device: Emulator, Pixel 4 XL
  • OS: Android 11.0, API 30

Screenshots
It's a crash, no screenshot available

Additional context
Stack trace:

java.lang.AbstractMethodError: abstract method "void io.flutter.plugin.platform.PlatformView.onFlutterViewAttached(android.view.View)"
    at io.flutter.plugin.platform.VirtualDisplayController.onFlutterViewAttached(VirtualDisplayController.java:181)
    at io.flutter.plugin.platform.PlatformViewsController$1.createVirtualDisplayForPlatformView(PlatformViewsController.java:233)
    at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:104)
    at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:59)
    at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
    at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
    at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:738)
    at android.os.MessageQueue.nativePollOnce(Native Method)
    at android.os.MessageQueue.next(MessageQueue.java:343)
    at android.os.Looper.loop(Looper.java:188)
    at android.app.ActivityThread.main(ActivityThread.java:7617)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:941)
@bdevay bdevay added the bug Something isn't working label Dec 20, 2020
@juliansteenbakker
Copy link
Collaborator

This is an issue with Flutter beta & dev branch (1.25 & 1.26). There is a workaround by adding android.enableDexingArtifactTransform=false to your gradle.properties file. The issue is being tracked here.

@juliansteenbakker juliansteenbakker changed the title Crash when building QRView [BUG] [FLUTTER 1.25 & 1.26] Crash when building QRView Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants