我这样设置了限制只允许json文件的选择,
FileDialog.build()
.setPath(avaliableStoragePath)
.setMimeTypes(new String[]{"application/json"})
但是代码报如下错误:
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.isEmpty()' on a null object reference
at com.kongzue.filedialog.adapter.FileAdapter.getMimeType(FileAdapter.java:146)
at com.kongzue.filedialog.adapter.FileAdapter.isSelectMimeType(FileAdapter.java:132)
at com.kongzue.filedialog.adapter.FileAdapter.getView(FileAdapter.java:107)
我这样设置了限制只允许json文件的选择, FileDialog.build() .setPath(avaliableStoragePath) .setMimeTypes(new String[]{"application/json"}) 但是代码报如下错误: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.isEmpty()' on a null object reference at com.kongzue.filedialog.adapter.FileAdapter.getMimeType(FileAdapter.java:146) at com.kongzue.filedialog.adapter.FileAdapter.isSelectMimeType(FileAdapter.java:132) at com.kongzue.filedialog.adapter.FileAdapter.getView(FileAdapter.java:107)
请问这是什么问题呢?