Android 使用getCacheDir时文件在哪里
在调试时,我发现GetCacheDir返回Android 使用getCacheDir时文件在哪里,android,Android,在调试时,我发现GetCacheDir返回/data/data/yourapp/cache/ 但当我存储文件时,我在该路径中找不到任何东西(使用shell), 但是在/sdcard/Android/data/yourapp/cache/中我找到了缓存文件? 谁能告诉我为什么 在调试时,我发现GetCacheDir返回/data/data/yourapp/cache/ 这听起来很适合我 但是,当我存储文件时,我在该路径(使用shell)中找不到任何东西,但在/sdcard/Android/data
/data/data/yourapp/cache/
但当我存储文件时,我在该路径中找不到任何东西(使用shell),
但是在/sdcard/Android/data/yourapp/cache/
中我找到了缓存文件?
谁能告诉我为什么
在调试时,我发现GetCacheDir返回/data/data/yourapp/cache/
这听起来很适合我
但是,当我存储文件时,我在该路径(使用shell)中找不到任何东西,但在/sdcard/Android/data/yourapp/cache/I中找到了缓存文件?谁能告诉我为什么
这就是你从中得到的
您确定使用了正确的API调用吗?您是否检查了文件操作的返回值(它们是否都成功)?您可以尝试使用一些文件函数来检查工作是否正常。(createNewFile,exists,getAbsolutePath)奇怪!我以前从未见过这种情况。你从日志上看到什么了吗?