Android Question [Solved] Error FileNotFoundException

Pflichtfeld

Active Member
Licensed User
I cannot find the fault in this:
B4X:
Dim cs As CSBuilder
    cs.Initialize
    'bild ist 600x200
    cs.Image(LoadBitmap(File.DirAssets,"Schneiden-SchleifWinkel.png"),ScrView.Width,ScrView.Width*200/600,False).Append(CRLF).PopAll
    'cs.Image(LoadBitmap(File.DirAssets,"Jig SL-Konst.png"),ScrView.Width,ScrView.Width*200/600,False).Append(CRLF).PopAll
(cs is beeing continued)
In line 4 this Error occurs:
java.io.FileNotFoundException: /data/user/0/b4a.GrindIt/files/virtual_assets/schneiden-schleifwinkel.png (No such file or directory)
When i comment that line and ancomment the next ("Jig SL-Konst.png") everything works fine.
That is what file-manager shows, both the files are present.
javaError.jpg

Can anybody help me please, to find the cause for this error?
 

Pflichtfeld

Active Member
Licensed User
Strange: I renamed the file in b4a-Explorer to "Schleifwinkel.png" and it then worked. I renamed it back to "Schneiden-Schleifwinkel.png" and it keeps on working fine. No idea why.
 
Upvote 0

Pflichtfeld

Active Member
Licensed User
Thank you Erel!
Today morning I was wondering, why the files are all in lower case in this sub. I must have clicked sync yesterday...
But in the B4A-Explorer they still are shown as before, with upper and lower cases...
 
Last edited:
Upvote 0

Pflichtfeld

Active Member
Licensed User
Note that they will be lower cased automatically if you click on the Sync option.
Had again same problem with other files: with sync click the files get lowercase in Window Explorer, but stay 'mixed' case in b4x-Explorer, and this seems to cause the file-not-found problem.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Had again same problem with other files: with sync click the files get lowercase in Window Explorer, but stay 'mixed' case in b4x-Explorer, and this seems to cause the file-not-found problem.
The files in the IDE keep the original case. This will never cause any problem. The files in the Files folder should be lower cased automatically.
 
Upvote 0
Top