-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Description
Steps to Reproduce
Taking pictures using camera crashes the Plugin (Image Picker by Flutter)
final pickedFile = await _picker.getImage(source: ImageSource.camera);
This plugin works in Emulator and Physical device with Android API <=29.
On Android Platform API 30, the plugin crashed with no available cameras exception.
I've used the system default camera app in Android API 30 and is opens up the camera and captures the image on the other hand, plugin shows exception of no cameras available for taking pictures.
All Runtime permissions are allowed and static manifest permissions are also declared.
Expected results:
Open Camera and Take picture from system default Camera App.
Actual results:
PlatformException(no_available_camera, No cameras available for taking pictures., null)
Logs
PlatformException(no_available_camera, No cameras available for taking pictures., null)[√] Flutter (Channel stable, v1.17.5, on Microsoft Windows [Version 10.0.18363.720], locale en-US)
• Flutter version 1.17.5 at D:\flutter_sdk
• Framework revision 8af6b2f (4 weeks ago), 2020-06-30 12:53:55 -0700
• Engine revision ee76268252
• Dart version 2.8.4
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
• Android SDK at D:\android_sdk
• Platform android-30, build-tools 30.0.1
• ANDROID_HOME = D:\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)
X Android license status unknown.
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions.
[√] Android Studio (version 4.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 47.1.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] VS Code, 64-bit edition (version 1.47.3)
• VS Code at C:\Program Files\Microsoft VS Code
• Flutter extension version 3.12.2
[√] Connected device (1 available)
• sdk gphone x86 64 • emulator-5554 • android-x64 • Android 11 (API 30) (emulator)