你是否 遇到过 代码怎么写都对 但还是无法在手机本地创建文件夹呢
这个时候 你要考虑一下是不是 自己的手机储存满了 或者 是操作系统是安卓10
如果是安卓10 不妨试下下面的方法 在清单文件里 加入
android:requestLegacyExternalStorage="true"
加的位置是:
<application
android:requestLegacyExternalStorage="true" //这里哦
android:allowBackup="true"
android:name=".SysApplication"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Mydebug">
<activity android:name=".MainActivity">
因为 安卓10是不允许乱创建文件夹的 所以 要把权限打开