Hi all,
I'm trying to simply open a file dialog and it ends with a java exception. It crashes on the fd.show instruction.
What am I doing wrong?
Thanks
Alain
The code is :
and the exception is :
main$ResumableSub_btPhoto_Clickresume (java line: 1156)
java.lang.NoSuchFieldError: No instance field Text of type Ljava/lang/String; in class Lanywheresoftware/b4a/objects/SimpleListAdapter$SingleLineData; or its superclasses (declaration of 'anywheresoftware.b4a.objects.SimpleListAdapter$SingleLineData' appears in /data/app/my.app.DJI_Waypoints-eUnCj6gJ3RhA_YRLUorGKQ==/base.apk)
at anywheresoftware.b4a.agraham.dialogs.InputDialog$FileDialog.loadFileList(InputDialog.java:1786)
at anywheresoftware.b4a.agraham.dialogs.InputDialog$FileDialog.Show(InputDialog.java:1832)
at my.app.DJI_Waypoints.main$ResumableSub_btPhoto_Click.resume(main.java:1156)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:267)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:207)
at anywheresoftware.b4a.BA$2.run(BA.java:387)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6944)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
main$ResumableSub_btPhoto_Clickresume (java line: 1156)
java.lang.NoSuchFieldError: No instance field Text of type Ljava/lang/String; in class Lanywheresoftware/b4a/objects/SimpleListAdapter$SingleLineData; or its superclasses (declaration of 'anywheresoftware.b4a.objects.SimpleListAdapter$SingleLineData' appears in /data/app/my.app.DJI_Waypoints-eUnCj6gJ3RhA_YRLUorGKQ==/base.apk)
at anywheresoftware.b4a.agraham.dialogs.InputDialog$FileDialog.loadFileList(InputDialog.java:1786)
at anywheresoftware.b4a.agraham.dialogs.InputDialog$FileDialog.Show(InputDialog.java:1832)
at my.app.DJI_Waypoints.main$ResumableSub_btPhoto_Click.resume(main.java:1156)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:267)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:207)
at anywheresoftware.b4a.BA$2.run(BA.java:387)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6944)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
I'm trying to simply open a file dialog and it ends with a java exception. It crashes on the fd.show instruction.
What am I doing wrong?
Thanks
Alain
The code is :
B4X:
Dim fd As FileDialog
Dim myFile As String = ""
Dim rp As RuntimePermissions
Dim i As Int
rp.CheckAndRequest(rp.PERMISSION_READ_EXTERNAL_STORAGE)
wait for activity_PermissionResult (Permission As String, Result As Boolean)
If Result Then
' ToastMessageShow("permission", False)
End If
' '---------------------------------------------------
' 'set file dialog input
fd.FastScroll = True
fd.FilePath = File.DirRootExternal
'ToastMessageShow(fd.FilePath, False)
fd.FileFilter = ".csv"
Try
i = fd.Show("Select file", "Yes", "Cancel", "t", Null)
Catch
Log(LastException)
End Try
and the exception is :
main$ResumableSub_btPhoto_Clickresume (java line: 1156)
java.lang.NoSuchFieldError: No instance field Text of type Ljava/lang/String; in class Lanywheresoftware/b4a/objects/SimpleListAdapter$SingleLineData; or its superclasses (declaration of 'anywheresoftware.b4a.objects.SimpleListAdapter$SingleLineData' appears in /data/app/my.app.DJI_Waypoints-eUnCj6gJ3RhA_YRLUorGKQ==/base.apk)
at anywheresoftware.b4a.agraham.dialogs.InputDialog$FileDialog.loadFileList(InputDialog.java:1786)
at anywheresoftware.b4a.agraham.dialogs.InputDialog$FileDialog.Show(InputDialog.java:1832)
at my.app.DJI_Waypoints.main$ResumableSub_btPhoto_Click.resume(main.java:1156)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:267)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:207)
at anywheresoftware.b4a.BA$2.run(BA.java:387)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6944)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
main$ResumableSub_btPhoto_Clickresume (java line: 1156)
java.lang.NoSuchFieldError: No instance field Text of type Ljava/lang/String; in class Lanywheresoftware/b4a/objects/SimpleListAdapter$SingleLineData; or its superclasses (declaration of 'anywheresoftware.b4a.objects.SimpleListAdapter$SingleLineData' appears in /data/app/my.app.DJI_Waypoints-eUnCj6gJ3RhA_YRLUorGKQ==/base.apk)
at anywheresoftware.b4a.agraham.dialogs.InputDialog$FileDialog.loadFileList(InputDialog.java:1786)
at anywheresoftware.b4a.agraham.dialogs.InputDialog$FileDialog.Show(InputDialog.java:1832)
at my.app.DJI_Waypoints.main$ResumableSub_btPhoto_Click.resume(main.java:1156)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:267)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:207)
at anywheresoftware.b4a.BA$2.run(BA.java:387)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6944)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)