Android logcat error “getExternalStorageState/mnt/sdcard” when checking for external storage state

被刻印的时光 ゝ 提交于 2019-12-23 09:57:52

问题


On my Galaxy Tab 10.1 I get strange logcat errors when checking the external storage state with:

Environment.getExternalStorageState();

Logcat says:

03-10 14:13:22.700: E/Environment(32754): getExternalStorageState/mnt/sdcard

Did not really find something helpful when searching on Google. The only information I found that this maybe has something to do with the filesystem.

Can this error be fixed? I used API Level 11 in this small Test Project.

Edit: Just to clarify... getExternalStorageState() works and returns MEDIA_MOUNTED, I was just curious about this logcat error.


回答1:


I think that this is just a debug log entry, not an error. I've seen error messages in logcat from my Galaxy Note that clearly do not mean errors.

You even can't find this message in the Android source code. It may be some debug messages added by the Samsung people.



来源:https://stackoverflow.com/questions/9646773/android-logcat-error-getexternalstoragestate-mnt-sdcard-when-checking-for-exte

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!