Android Question B4A 7.80 Warning for unused files

jahswant

Well-Known Member
Licensed User
Longtime User
Moved to the questions forum.

The unused files warning will not appear at all if you load an asset file in a non-static way.
For example:
B4X:
LoadBitmap(File.DirAssets, "aaa" & x)
Because it's no more possible to know which will be loaded or not.
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
Moved to the questions forum.

The unused files warning will not appear at all if you load an asset file in a non-static way.
For example:
B4X:
LoadBitmap(File.DirAssets, "aaa" & x)
I know but I have not used (no more) them (2 image files) at all, in any line of code.
As always, I can not reproduce that error, because I removed them. I will search for an old version of the project.
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
I will search for an old version of the project.

upload_2018-1-15_15-41-22.png






upload_2018-1-15_15-41-31.png
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
Yes but "aaa" should be part of the file name (in my intention, in your example) or X should be.

Check my project: I renamend Trofeo.png to OLDTrofeo.png because I was trying to use an animated gif (and this worked) an I forgot to remove OLDTrofeo.png.
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
No. The warning engine doesn't try to evaluate the expression. If it is not a string literal then it disables this warning completely.
is it possible that I am understanding the opposite?

The engine is not able, cannot evaluate variables; just for this reason if I search the file name in my code and I don't find it (post #5), as the engine does, the warning should be shown. Or not?!?!

I'm still convinced that this is a bug.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
The engine is not able, cannot evaluate variables; just for this reason if I search the file name in my code and I don't find it (post #5), as the engine do, the warning should be shown. Or not?!?!
It depends. See my answers in posts #2, #6, #8, #10. No point in writing the same answer for the fifth time
 
Upvote 0
Top