Can't create directory in Android 10

后端 未结 5 1624
感情败类
感情败类 2020-11-22 08:38

I\'m unable to create directory in android 10. It\'s working on devices till android Oreo.

I tried two ways for creating folders.

Using

5条回答
  •  灰色年华
    2020-11-22 09:11

    For Android 10, you can add

    android:requestLegacyExternalStorage="true"

    to your element in the manifest. This opts you into the legacy storage model, and your existing external storage code will work. This fix will not work on Android R and higher though, so this is only a short-term fix.

提交回复
热议问题