B4J Question banano 9 first app first error BANano.Build(File.DirApp)

tango

Active Member
Licensed User
Longtime User
help me

BANano.Build(File.DirApp) gives errors
 

Attachments

  • banano9-h1.PNG
    banano9-h1.PNG
    127.7 KB · Views: 49

tango

Active Member
Licensed User
Longtime User
compiles fine here out of the box. Which version of B4J do you use?
b4j version 10



banano 9.03 PWA give error and all my try is failed
but minimal is not
why?
is there any problem about internal designer?

Attachments​

 

Attachments

  • banano9-h1.PNG
    banano9-h1.PNG
    127.7 KB · Views: 44
Last edited:
Upvote 0

alwaysbusy

Expert
Licensed User
Longtime User
Please do not post the same question everywhere on the forum. It is very hard to follow and to try to find a solution for your problem. There are no reports from anyone with problems from the internal designer. It has to be something specific to your situation.

Please post the full log (not a screenshot!) between code tags. [_code_] and [_/_code_] but without the underscores ( _ ).

From the error stack I can point out where the error happens in the BANano library, but it does make very little sense to me at the moment as it has to do with #if CSS en #End if and there is no such thing in de template for a BANano PWA.

B4X:
        String first = "#if css";
        String last = "#end if";
        String sLC = s.toLowerCase();
        int len = last.length();
        int firstlen = first.length();
        int begin=sLC.indexOf(first);
        while (begin>-1) {
            int stop=sLC.indexOf(last, begin+1);  // <--------------------------------------------------------
           ...

Here is what we can try:

1. Download my latest work version of BANano 9.05: https://gorgeousapps.com/BANano9.05.zip
2. delete BANano.jar, BANano.xml and BANanoSkeleton.b4xlib from your B4J Libraries and Additional Libraries folders
3. copy all the files from the Libraries forder in the zip file to your B4J Additional Libraries folder
4. when you open the project, you should see this in the B4J IDE under libraries:



5. Do a clean project (shouldn't be needed but why not)



6. Run the project in debug mode.

If an error occurs, post the full log here in code tags (not a screenshot!)

Alwaysbusy
 
Upvote 0

tango

Active Member
Licensed User
Longtime User
hi friend.
i tried pure pwa sample, no any special code
and full log below

-------------------------------------------

Waiting for debugger to connect...
Program started.
BANanoLOGS
D:\BANANO\a1\Objects
Reading B4J INI in C:\Users\pc\AppData\Roaming\Anywhere Software\B4J to find Additional Libraries folder...
Found Additional Libraries folder: D:\Anywhere Software\B4J\additional_libraries
Starting to transpile...
D:\BANANO\a1\Objects
------------------------------------------------------------------------------
BANano v9.05 is now converting the B4J code to JavaScript...
------------------------------------------------------------------------------
[WARNING]: RemoveDeadCode is disabled if EnableLiveCodeSwapping = true
Merging CSS files ignored. Only applicable for Build in Release mode.
Merging Javascript files ignored. Only applicable for Build in Release mode.
Building D:\BANANO\a1\Objects\BANanoSkeleton\scripts\app1730542007999.js
Processing b4xlib: bananoskeleton
Loading layout mainlayout...
Loading layout menulayout...
Loading layout welcomemodallayout...
Loading layout welcomepagelayout...
Error occurred on line: 102 (Main)
java.lang.StringIndexOutOfBoundsException: begin 5261, end -1, length 14489
at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3756)
at java.base/java.lang.String.substring(String.java:1902)
at com.ab.banano.BANanoModule.ExtractCSS(BANanoModule.java:2381)
at com.ab.banano.BANanoModule.BuildLinesFromString(BANanoModule.java:1799)
at com.ab.banano.BANanoModule.BuildLines(BANanoModule.java:1626)
at com.ab.banano.BANanoModule.Prepare(BANanoModule.java:1234)
at com.ab.banano.BANano.InnerBuild(BANano.java:3072)
at com.ab.banano.BANano.Build(BANano.java:2865)
at b4j.example.main._appstart(main.java:157)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:629)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:234)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:111)
at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:100)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:98)
at b4j.example.main.start(main.java:38)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Thread.java:832)
 
Upvote 0

tango

Active Member
Licensed User
Longtime User
 
Upvote 0

tango

Active Member
Licensed User
Longtime User
i saw that bananominimal is no giving any error. But if i only check bananoskeleton library to app , it gives same error.
 
Upvote 0