attribute android:requestLegacyExternalStorage not found flutter imagepicker

Viewed 1819

I am a beginner in Flutter. I was just trying to add ImagePicker in a simple example, but when I try to add in dependencies and android:requestLegacyExternalStorage="true".

attribute android:requestLegacyExternalStorage not found. error occurs. I have checked other answers in StackoverFlow. But didn't work for me?

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.flutter_imagepicker">
    <!-- io.flutter.app.FlutterApplication is an android.app.Application that
    <application
        android:requestLegacyExternalStorage="true"


This is not the way to add android:requestLegacyExternalStorage? or something else.

1 Answers

having the same problem here.. tried everything google throws on my screen and seems nothing works.

Mine seems something to do with Exception: The plugin flutter_barcode_scanner could not be built due to the issue above.

solution that work for me is that go to app build.gradle and update default config targetSdkVersion to 29.

Related