Android Question DirAssets folder not created

ViMeAv ICT

Member
Licensed User
Longtime User
Suddenly the dirassets folder is not created when i reinstall the release apk.
I deleted the old version (12) and hereby the dirassets folder was deleted automatically.
Then I installed the new version (15) but no dirassets folder was created.
What can be the problem?
 

DonManfred

Expert
Licensed User
Longtime User
I guess it is only created if you use
B4X:
#DebuggerForceStandardAssets: true

Assets is a virtual folder
 
Upvote 0

ViMeAv ICT

Member
Licensed User
Longtime User
Error Message :
java.io.FileNotFoundException: /storage/emulated/0/Android/data/storemgr.b4a/files/book_open.png: open failed: ENOENT (No such file or directory)
 
Upvote 0

JordiCP

Expert
Licensed User
Longtime User
Error Message :
java.io.FileNotFoundException: /storage/emulated/0/Android/data/storemgr.b4a/files/book_open.png: open failed: ENOENT (No such file or directory)
That error message doesn't necessarily imply that the Assets folder (or any other) does not exist. Most probably it is the file which is not found. Perhaps a mispelling error or that the file name needs to be all lower-case (Android is case-sensitive)?

You can always check the real contents with File.ListFiles(File.DirAssets)
 
Upvote 0

ViMeAv ICT

Member
Licensed User
Longtime User
The Assets folder was not the problem. The copy to folder didn't exist. I had to copy a file in it, to create, it seems.

B4X:
Dim testfolder As String = rp.GetSafeDirDefaultExternal("")
        File.WriteString(testfolder,"test.txt","aaa")
 
Upvote 0
Top