Search code examples
codenameone

FileSystemStorage issue


this issue start appeared in some android devices before two weeks

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: stack size …

the app stuck and after while the error appeared

enter image description here


Solution

  • add build hint

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