http://blog.youkuaiyun.com/zhengdan66/article/details/8930252
android 获取系统默认路径
Environment.getDataDirectory().getPath() : /data
Environment.getDownloadCacheDirectory().getPath() : /cache
Environment.getExternalStorageDirectory().getPath(): /mnt/sdcard
Environment.getRootDirectory().getPath() : /system
Context.getCacheDir().getPath() : /data/data/com.zhd/cache
Context.getExternalCacheDir().getPath() : /mnt/sdcard/Android/data/com.zhd/cache
Context.getFilesDir().getPath() : /data/data/com.zhd/files
Context.getObbDir().getPath() : /mnt/sdcard/Android/obb/com.zhd
Context.getPackageName() : com.zhd
Context.getPackageCodePath() : /data/app/com.zhd-1.apk
Context.getPackageResourcePath() : /data/app/com.zhd-1.apk
//
本文详细介绍了在Android开发中如何使用不同方法获取系统及应用的各种路径,包括数据目录、缓存目录、外部存储等。
778

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



