Android Question External Storage Error !

Ho Guys, my problem is: (b4a-7.80)
- I'm using External Storage (V1.03) example to access USB drive and copy files from it.
So , with my Mass Storage connected, i try PickFolder buttom and follow error comes..:


*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Can use persistant uri!
Error occurred on line: 150 (ExternalStorage)
java.lang.ClassNotFoundException: android.support$v4$provider$DocumentFile
at anywheresoftware.b4j.object.JavaObject.getCorrectClassName(JavaObject.java:288)
at anywheresoftware.b4j.object.JavaObject.InitializeStatic(JavaObject.java:74)
at b4a.example3.externalstorage._getpickeddir(externalstorage.java:455)
at b4a.example3.externalstorage._setpickeddir(externalstorage.java:528)
at b4a.example3.externalstorage._selectdir(externalstorage.java:137)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:710)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:339)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:139)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:170)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:166)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
at android.view.View.performClick(View.java:5201)
at android.view.View$PerformClick.run(View.java:21163)
at android.os.Handler.handleCallback(Handler.java:746)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
** Activity (main) Pause, UserClosed = true **
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **

Regards, Albert
 

DonManfred

Expert
Licensed User
Longtime User
Upload a small project which shows the issue.
My guess is that you did not successfully implemted ExternalStorage Class. Missing
B4X:
#AdditionalJar: com.android.support:support-core-utils
?
If not missing then, i guess, you are not using AndroidX

1. Update to B4A 9.8. No reason not to upgrade; it is free.
2. Reinstall everything new (including SDK).

follow the Instructions here:
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…