-
Notifications
You must be signed in to change notification settings - Fork 29.2k
Description
camera_android: 0.9.8+1
flutter doctor -v
[√] Flutter (Channel stable, 3.0.2, on Microsoft Windows [Version 10.0.19044.1766], locale zh-CN)
• Flutter version 3.0.2 at D:\Tools\Android\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision cd41fdd (10 days ago), 2022-06-08 09:52:13 -0700
• Engine revision f15f824b57
• Dart version 2.17.3
• DevTools version 2.12.2
• Pub download mirror http://pub.lan.wiqun.com
• Flutter download mirror https://storage.flutter-io.cn
Checking Android licenses is taking an unexpectedly long time...[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at D:\Tools\Android\SDK
• Platform android-32, build-tools 30.0.3
• ANDROID_HOME = D:\Tools\Android\SDK
• Java binary at: C:\Users\Pawn\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\202.7322048\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.4)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
• Visual Studio Community 2019 version 16.9.31205.134
• Windows 10 SDK version 10.0.19041.0
[√] Android Studio (version 4.2)
• Android Studio at C:\Users\Pawn\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\202.7322048
• 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 11.0.8+10-b944.6842174)
[√] IntelliJ IDEA Community Edition (version 2020.3)
• IntelliJ at C:\Users\Pawn\AppData\Local\JetBrains\Toolbox\apps\IDEA-C\ch-0\203.6682.168
• 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
[√] IntelliJ IDEA Community Edition (version 2021.1)
• IntelliJ at C:\Users\Pawn\AppData\Local\JetBrains\Toolbox\apps\IDEA-C\ch-0\211.7628.21
• 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
[√] VS Code (version 1.68.1)
• VS Code at C:\Users\Pawn\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.42.0
[√] Connected device (4 available)
• LND AL40 (mobile) • 3SLBB18414213204 • android-arm64 • Android 8.0.0 (API 26)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19044.1766]
• Chrome (web) • chrome • web-javascript • Google Chrome 102.0.5005.115
• Edge (web) • edge • web-javascript • Microsoft Edge 102.0.1245.41
[√] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
Logs
AndroidCamera.registerWith (package:camera_android/src/android_camera.dart:32:66)
I/flutter ( 1198): #1 _PluginRegistrant.register (file:///xxxx/.dart_tool/flutter_build/dart_plugin_registrant.dart:36:23)
I/flutter ( 1198): camera_android
threw an error: Binding has not yet been initialized.
I/flutter ( 1198): The "instance" getter on the ServicesBinding binding mixin is only available once that binding has been initialized.
I/flutter ( 1198): Typically, this is done by calling "WidgetsFlutterBinding.ensureInitialized()" or "runApp()" (the latter calls the former). Typically this call is done in the "void main()" method. The "ensureInitialized" method is idempotent; calling it multiple times is not harmful. After calling that method, the "instance" getter will return the binding.
I/flutter ( 1198): In a test, one can call "TestWidgetsFlutterBinding.ensureInitialized()" as the first line in the test's "main()" method to initialize the binding.
I/flutter ( 1198): If ServicesBinding is a custom binding mixin, there must also be a custom binding class, like WidgetsFlutterBinding, but that mixes in the selected binding, and that is the class that must be constructed before using the "instance" getter.. The app may not function as expected until you remove this plugin from pubspec.yaml
E/flutter ( 1198): [ERROR:flutter/shell/common/shell.cc(93)] Dart Unhandled Exception: Binding has not yet been initialized.
E/flutter ( 1198): The "instance" getter on the ServicesBinding binding mixin is only available once that binding has been initialized.
E/flutter ( 1198): Typically, this is done by calling "WidgetsFlutterBinding.ensureInitialized()" or "runApp()" (the latter calls the former). Typically this call is done in the "void main()" method. The "ensureInitialized" method is idempotent; calling it multiple times is not harmful. After calling that method, the "instance" getter will return the binding.
E/flutter ( 1198): In a test, one can call "TestWidgetsFlutterBinding.ensureInitialized()" as the first line in the test's "main()" method to initialize the binding.
E/flutter ( 1198): If ServicesBinding is a custom binding mixin, there must also be a custom binding class, like WidgetsFlutterBinding, but that mixes in the selected binding, and that is the class that must be constructed before using the "instance" getter., stack trace: #0 BindingBase.checkInstance. (package:flutter/src/foundation/binding.dart:281:9)
E/flutter ( 1198): #1 BindingBase.checkInstance (package:flutter/src/foundation/binding.dart:363:6)
E/flutter ( 1198): #2 ServicesBinding.instance (package:flutter/src/services/binding.dart:48:54)
E/flutter ( 1198): #3 MethodChannel.setMethodCallHandler (package:flutter/src/services/platform_channel.dart:387:51)
E/flutter ( 1198): #4 new AndroidCamera (package:camera_android/src/android_camera.dart:26:13)
E/flutter ( 1198): #5 AndroidCamera.registerWith (package:camera_android/src/android_camera.dart:33:31)
E/flutter ( 1198): #6 _PluginRegistrant.register (file:///xxxx/.dart_tool/flutter_build/dart_plugin_registrant.dart:36:23)
E/flutter ( 1198):