facundomedica / fast_qr_reader_view

A Fast QR Reader widget for Flutter. For both Android and iOS
MIT License
295 stars 163 forks source link

App Crashes on launch #71

Closed RahulDevCodiant closed 2 years ago

RahulDevCodiant commented 4 years ago

I've created a POC for QR code reader, but it keeps crashing when app launch.

Flutter doctor :

D:\Flutter_Work_Space\fast_qr_code_demo\fast_qr_code_demo>flutter doctor -v [√] Flutter (Channel stable, v1.12.13+hotfix.5, on Microsoft Windows [Version 10.0.10240], locale en-US) • Flutter version 1.12.13+hotfix.5 at D:\Flutter_Code_Backup\flutter_windows_v1.12.13+hotfix.5-stable\flutter • Framework revision 27321ebbad (5 weeks ago), 2019-12-10 18:15:01 -0800 • Engine revision 2994f7e1e6 • Dart version 2.7.0

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.1) • Android SDK at C:\Users\admin\AppData\Local\Android\sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-29, build-tools 29.0.1 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01) • All Android licenses accepted.

[√] Android Studio (version 3.4) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin version 39.0.1 • Dart plugin version 183.6270 • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[√] VS Code (version 1.41.0) • VS Code at C:\Users\admin\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.7.0

[√] Connected device (1 available) • SM G570F • 42006e4bc67493b3 • android-arm • Android 8.0.0 (API 26)

• No issues found!


Crash Details :

2020-01-14 11:37:01.689 18432-18432/com.fast_qr_code_demo E/AndroidRuntime: FATAL EXCEPTION: main Process: com.fast_qr_code_demo, PID: 18432 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.fast_qr_code_demo/com.fast_qr_code_demo.MainActivity}: java.lang.UnsupportedOperationException: The new embedding does not support the old FlutterView. at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2957) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3032) at android.app.ActivityThread.-wrap11(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6942) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374) Caused by: java.lang.UnsupportedOperationException: The new embedding does not support the old FlutterView. at io.flutter.embedding.engine.plugins.shim.ShimRegistrar.view(ShimRegistrar.java:82) at co.apperto.fastqrreaderview.FastQrReaderViewPlugin.registerWith(FastQrReaderViewPlugin.java:168) at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:17) at com.fast_qr_code_demo.MainActivity.configureFlutterEngine(MainActivity.kt:10) at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(FlutterActivityAndFragmentDelegate.java:185) at io.flutter.embedding.android.FlutterActivity.onCreate(FlutterActivity.java:418) at android.app.Activity.performCreate(Activity.java:7183) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1221)

kuchmiyalex commented 4 years ago

Same issue, after adding fast_qr_reader_view I'm not able to launch app anymore on Android device.

hieuh0 commented 4 years ago

I m also having the same error you are. Do you have a solution or alternative?

RahulDevCodiant commented 4 years ago

i've switched to this plugin

https://pub.dev/packages/qr_code_scanner

facundomedica commented 2 years ago

Just did a big refactor and now it should work 😄