文件系统存储问题

时间:2021-01-26 09:32:14

标签: codenameone

这个问题在两周前开始出现在一些安卓设备上

Display.getInstance().openGallery(new ActionListener<ActionEvent>() {
@Override
public void actionPerformed(ActionEvent evt) {
if(evt!=null&&evt.getSource()!=null){
String imageFilePath = (String) evt.getSource();

Image.createImage(FileSystemStorage.getInstance().openInputStream(imageFilePath));

}

}, Display.GALLERY_IMAGE);

<块引用>

FileSystemStorage.getInstance().openInputStream(imageFilePath)

<块引用>

java.lang.stackoverflowerror: 堆栈大小……

应用卡住,然后出现错误

enter image description here

1 个答案:

答案 0 :(得分:3)

添加构建提示

<块引用>

codename1.arg.android.xapplication_attr=android:requestLegacyExternalStorage="true"