Android Question B4A was not used long ago: error in the OLD projects

peacemaker

Expert
Licensed User
Longtime User
Hi, All

Long ago did not use B4A, tried, re-installed, re-downloaded JDK and SDK, but anyway error:

What is forgotten ?

p.s. if to use old JDK 11 - compiled OK, but just at start app - the system msgbox that app is "closed due to error". IDE is not connected to the phone (Samsung Android 14), the MEMU emulator is the same result.

p.s.2: just new default B4XPage project from template - is fully OK. But any existing project with WebView or UltimateWebView - error immediately at start, without error log.
 
Last edited:
Solution
HA ! SOLVED !

"#if java" blocks of the B4J app must be isolated in B4A crossplatform version !

B4X:
 #if B4J

#if java
import javafx.scene.web.*;
import javafx.event.*;
import javafx.util.Callback;  //non-Android classes - must be isolated
...
#End If
#End If

peacemaker

Expert
Licensed User
Longtime User
new default B4XPage project from template - is fully OK
Hmmm, at the new project from template - no error "error: package javafx.util does not exist" if to use JDK 19...

If to delete whole "Objects" folder and re-compile - error with JDK 19 at old projects - anyway is here .
-------------

What's wrong in the old projects for the latest B4A and JDK19 ?
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
HA ! SOLVED !

"#if java" blocks of the B4J app must be isolated in B4A crossplatform version !

B4X:
 #if B4J

#if java
import javafx.scene.web.*;
import javafx.event.*;
import javafx.util.Callback;  //non-Android classes - must be isolated
...
#End If
#End If
 
Upvote 0
Solution
Cookies are required to use this site. You must accept them to continue using the site. Learn more…