(This post has a B4i companion here.)
Let's say you have a library that is a view. (Example: AS Checkbox, which is what I used when I found this issue.)
Add that view to a layout but don't reference it in code anywhere.
Disable the library in the Libraries Manager.
The IDE will not warn about a missing library.
The IDE will happily compile the project without complaining about the missing library.
If compiled as Debug, at app launch, an exception happens that seems unrelated:
If compiled as Release, the app crashes when trying to load the layout.
It seems reasonable that the IDE should warn about missing library references, even if they are in layouts. The absolutely bare minimum would be that it complain about the missing reference during compilation and stop the compilation process.
Let's say you have a library that is a view. (Example: AS Checkbox, which is what I used when I found this issue.)
Add that view to a layout but don't reference it in code anywhere.
Disable the library in the Libraries Manager.
The IDE will not warn about a missing library.
The IDE will happily compile the project without complaining about the missing library.
If compiled as Debug, at app launch, an exception happens that seems unrelated:
B4X:
java.lang.RuntimeException: Unable to create service my.fine.app.starter: java.lang.RuntimeException: java.io.EOFException
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4498)
at android.app.ActivityThread.-$$Nest$mhandleCreateService(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2161)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7872)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Caused by: java.lang.RuntimeException: java.io.EOFException
at anywheresoftware.b4a.shell.Shell.virtualAssets(Shell.java:164)
at anywheresoftware.b4a.shell.Shell.start(Shell.java:102)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:105)
at io.hardhat.id06.starter.onCreate(starter.java:34)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4485)
... 9 more
Caused by: java.io.EOFException
at java.io.DataInputStream.readFully(DataInputStream.java:205)
at java.io.DataInputStream.readInt(DataInputStream.java:394)
at anywheresoftware.b4a.shell.Shell.virtualAssets(Shell.java:136)
... 13 more
If compiled as Release, the app crashes when trying to load the layout.
It seems reasonable that the IDE should warn about missing library references, even if they are in layouts. The absolutely bare minimum would be that it complain about the missing reference during compilation and stop the compilation process.