Codenameone 根文件系统:iOS以file://开头,android不以';T

Codenameone 根文件系统:iOS以file://开头,android不以';T,codenameone,Codenameone,考虑代码片段: String[] roots = FileSystemStorage.getInstance().getRoots(); String root = roots[0]; for (int i = 0; i < roots.length; i++) { if (FileSystemStorage.getInstance().getRootType(roots[i]) == FileSystemStora

考虑代码片段:

    String[] roots = FileSystemStorage.getInstance().getRoots();

    String root = roots[0];
            for (int i = 0; i < roots.length; i++) {
                if (FileSystemStorage.getInstance().getRootType(roots[i]) == FileSystemStorage.ROOT_TYPE_MAINSTORAGE) {
                    root = roots[i];
                    break;
                }
            }
return root;
String[]root=FileSystemStorage.getInstance().getRoots();
字符串根=根[0];
for(int i=0;i
在Android设备上,至少在我的情况下,返回的格式是: “/storage/emulated/0..”但在iOS上类似”file://var/mobile...".
这是故意的吗?为什么iOS会添加“文件:/”?我花了几个小时才弄清楚为什么文件路径在Android上解析正确(我重复了file://),而在iOS上解析不正确。

前一段时间有一个问题,我不记得它最终没有正式一致的确切原因。
文件:
URL将在Android和iOS上一致工作,并且两者都应接受以
/
开头的文件

我想我们只是太胆小了,不敢修改代码。我会在下一次更新时在Android上修复它,希望它不会破坏一切