4

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.

Mahi
  • 1,297
  • 1
  • 14
  • 28

1 Answers1

0

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.

Hanis
  • 309
  • 1
  • 6
  • 15
  • 1
    I think it's a kind of bug, just showing red squiggly lines. But runs without a problem. – Mahi Oct 30 '20 at 01:25