//获取当前程序路劲
.getApplicationContext().getFilesDir().getAbsolutePath()>>>>>
File Explorer下查看文件路劲/data/data/ 工程包名[com.imooc.test] /files
//获取SD卡路径
Environment.getExternalStorageDirectory()
>>>>>> File Explorer下查看文件路劲/mnt/shell/emulated/0/
本文介绍了在Android开发中如何获取应用程序的文件路径和SD卡路径。通过使用`getApplicationContext().getFilesDir().getAbsolutePath()`来获取应用自身的文件路径,以及通过调用`Environment.getExternalStorageDirectory()`来获取外部SD卡的根目录。
//获取当前程序路劲
.getApplicationContext().getFilesDir().getAbsolutePath()>>>>>
File Explorer下查看文件路劲/data/data/ 工程包名[com.imooc.test] /files
//获取SD卡路径
Environment.getExternalStorageDirectory()
>>>>>> File Explorer下查看文件路劲/mnt/shell/emulated/0/

被折叠的 条评论
为什么被折叠?