You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After some debugging, the reason is that there is a file name that not encoded in UTF-8 format. This crash will only occur in Debug mode, because the debuggable attribute will be set to 'true` in release version, so this will not happen.
Recently, I encountered a crash while read file from external storage. Stack trace shown below:
最近在开发的时候,偶遇到扫描 SD 卡文件列表直接崩溃的情况,报错堆栈如下:
After some debugging, the reason is that there is a file name that not encoded in UTF-8 format. This crash will only occur in Debug mode, because the
debuggable
attribute will be set to 'true` in release version, so this will not happen.经过排查, 应该是该文件的名字不符合 UTF-8 编码,此崩溃仅在 debug 模式下会出现,如果是 release 版本,打包时会被设置
debuggable=false
,所以不会出现此情况。在开发阶段可以删除有问题的文件。不会影响线上使用,请知悉。
参看:
The text was updated successfully, but these errors were encountered: