I included image_picker: ^0.6.6+5 in dependencies of my pubspac.yaml and it caused App Crash, what should I do to resolve this?

Viewed 113

This Error was Generated in Terminal

E/AndroidRuntime(26893): FATAL EXCEPTION: main E/AndroidRuntime(26893): Process: com.example.foodie, PID: 26893 E/AndroidRuntime(26893): java.lang.RuntimeException: Unable to get provider io.flutter.plugins.imagepicker.ImagePickerFileProvider: java.lang.ClassNotFoundException: Didn't find class "io.flutter.plugins.imagepicker.ImagePickerFileProvider" on path: DexPathList[[zip file "/data/app/com.example.foodie-LtWdZUg_DqkUEi_puaVWDw==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.foodie-LtWdZUg_DqkUEi_puaVWDw==/lib/arm64, /data/app/com.example.foodie-LtWdZUg_DqkUEi_puaVWDw==/base.apk!/lib/arm64-v8a, /system/lib64, /product/lib64]]

1 Answers

Add android:requestLegacyExternalStorage="true" as an attribute to the tag in AndroidManifest.xml. The attribute is false by default on apps targeting Android Q.

Related