Android Question Which Android versions does B4A with JDK v8 support?

xdavidx

New Member
Licensed User
Hello,

Brand new here. It appears like the latest version of B4A and B4J require JDK v8 (if using that instead of OpenJDK). From my very limited understanding, there are limitations with using newer JDKs with older versions of Android. The current FAQ for B4A states:

Q: Which phones and tablets are supported?
A: All Android devices running Android 2.0 or above are supported.

1) Is that still true with JDK v8?

2) Or is it simply a matter of JDK v8 being required to run the B4A environment and there is some option for picking which JDK version to use for compiling and running the code?

3) Or is it that JDK v8 will be used to compile the code, but B4A doesn't use any Java features for generated code that conflict with older versions of Android and as long as the developer doesn't inline any Java code or use any Java libraries that use incompatible features, it will run properly on older versions of Android?

4) Are there any differences regarding Android versions supported/affected if using OpenJDK instead of Oracle's JDK?

My use case is to start developing with B4J, but then add B4A to use the same application code on the desktop and Android. I'm aware of B4XUI and how that works, in theory, to have a shared codebase, but I'm just not clear on the limitations regarding B4X generated code as it pertains to JDK versions.

Thanks for any help you can provide.

David
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Q: Which phones and tablets are supported?
A: All Android devices running Android 2.0 or above are supported.

1) Is that still true with JDK v8?
Yes.
The source code compatibility is set to Java 7.

Are there any differences regarding Android versions supported/affected if using OpenJDK instead of Oracle's JDK?
I recommend using Oracle Java 8 at this point. B4A will work with OpenJDK 11 but you will encounter issues with the SDK Manager.
 
Upvote 0

xdavidx

New Member
Licensed User
Thanks for the ultra fast reply!

I'll stick with Oracle Java 8. Avoiding issues is high on the priority list at this point in time. ;)

I'm really looking forward to using B4X after avoiding starting the project (for many months) due to the barrier to entry of learning FXML and the complexity of coding for JavaFX. Finding B4X last week had a major impact on my outlook for doing this work.

Thanks,
David
 
Upvote 0
Top