方法:
File rootDir = android.os.Environment.getExternalStorageDirectory()
需要权限
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
方法:
File rootDir = android.os.Environment.getExternalStorageDirectory()
需要权限
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
本文标题:Android 获取SD卡根目录
本文链接:https://www.haomeiwen.com/subject/ghkhdktx.html
网友评论