Page 2 of 3

Re: Android Studio - Additional JDK not needed (Solution to Java is none error)

Posted: Sun Jun 20, 2021 2:28 pm
by Bernard
garmeister wrote:
Sun May 16, 2021 6:46 pm
Bernard,
I wanted to give you a big THANKS as well (at least for Win 10). Mac OS has been very troublesome with the hidden folder that Android SDK is installed in (able to workaround), the fact that there are TWO JavaVirtualMachines folders in the Mac OS (see attached pic from Eclipse IDE).

/Users/garychike/Library/Java/JavaVirtualMachines/
/Library/Java/JavaVirtualMachines/

Java SE 8, recommended by LiveCode, installs into the latter directory with no option to select the directory. LiveCode seems to direct itself, as you mentioned, to the OpenJDK which is located in the former directory and LiveCode will not accept the default Java 8 SDK directory probably due to Android Studio defaulting to the OpenJDK version. So it seems Android development on the Mac is dead in the water, at least for now.
Just to say that on my new Mac M1, having only installed Android Studio as the only software using Java, I do not have
Library/Java/JavaVirtualMachines/
in my the /Users folder hierarchy.
But there is
/Library/Java/Extensions/
/Library/Java/JavaVirtualMachines/
...but both of them are empty! So (at least in my case) these Java-related detritus in /Library are just noise.

However, there are also java, javac, etc. in /usr/bin/ (these are the same version as found in Android Studio, so I'm guessing they were installed by Android Studio).

It now works on M1 Mac/Big Sur. See last section of my post at the beginning of this thread.

Re: Android Studio - Additional JDK not needed (Solution to Java is none error)

Posted: Sun Jun 20, 2021 2:34 pm
by Bernard
jacque wrote:
Mon May 17, 2021 5:18 pm
I've been creating Android apps on Mac regularly without any problems (I just did one yesterday.) I downloaded the SDK from Oracle and it installed into my user folder. I avoid Android Studio for the most part.

It looks like you have several versions of Java. I'd delete them all except the one that LC needs.
The problem is that Livecode tells users that the SDK-tools-only route was deprecated in the 8.1.5 timeline (red warning, top of page).
The most recent version of the Android SDK tools do not work with LiveCode. If you are using LiveCode 8.1.5 or later please install Android Studio as described in this lesson.
See here: https://lessons.livecode.com/m/2571/l/2 ... er-on-a-pc
Users are told to install Android Studio instead.

Re: Android Studio - Additional JDK not needed (Solution to Java is none error)

Posted: Sun Jun 20, 2021 2:52 pm
by Klaus
Here the pathnames on my successfull Android Studio installation:
Android SDK -> /Users/klaus2/Library/Android/sdk
## I also used the trick with an ALIAS of that folder
JDK path -> /Applications/Android Studio.app/Contents/jre/jdk

Maybe that helps.

Re: Android Studio - Additional JDK not needed (Solution to Java is none error)

Posted: Sun Jun 20, 2021 3:51 pm
by Bernard
I got it all working and I updated the first post in this thread. I guess I've now spent about 16 hours on debugging and fixing this in 2020 and 2021. And that is someone who's done shell scripting for 25 years, worked extensively with Java for 5 years, and 20 years with Livecode.

LC really need to sort this out. I've seen some users comment that they couldn't even follow my instructions above.

Re: Android Studio - Additional JDK not needed (Solution to Java is none error)

Posted: Tue Jun 22, 2021 9:38 pm
by sphere
Take a look at B4A how beautiful they integrated this sh*t in their 100% free program (also for commercial use). Install Java JDK, install Android Studio, start B4X and add/upate all needed sdk from within, no need to open Android Studio.

LC could win so much users by making it even more easier, same counts for people with (code)signing and creating keys for iOs/Apple/Windows/Android apps, should been taking care of inside LC. For Apple it's now greatly taken care by Matthias, this was a job for LC in my humble opinion.

Re: Android Studio - Additional JDK not needed (Solution to Java is none error)

Posted: Wed Jun 23, 2021 11:27 am
by Bernard
I agree that Livecode need to sort this out. It seems strange that they don't, given that one of the things that would draw new users to the IDE is the ability to produce apps for iOS/Android. It's claimed that most computing devices are no longer desktop, with Android being 72% of the non-desktop market.

The installation/setup instructions provided by Livecode for Android development are a mess. Some advanced users (e.g. Jacque and Andre) have no trouble setting up their development environment using techniques that deviate significantly from what Livecode recommend. I have tried here to help Livecode find a way to setup Android development in a cross-platform way using only the LC IDE and what comes with Android Studio. What I've done here would probably be off-putting for new users who don't know how to delve into the innards of the LC IDE, who don't know what's going on behind the scenes with the compilation to APK process.

I can't help but feel that the philosophy of offering easy development for Android is seen by new users as a false claim when they can't get LC/AS setup without numerous errors and dead-ends. The Livecode Lesson refers to LC 9.6.1, so it's not that old. https://lessons.livecode.com/m/2571/l/6 ... oid-studio

I guess what B4X has in their favour is that their tools are already heavily integrated with Java. Unfortunately for me a) I'm tired of learning new environments/languages b) I am developing something that needs the late-binding that comes with Livecode.

Re: Android Studio - Additional JDK not needed (Solution to Java is none error)

Posted: Wed Jun 23, 2021 10:14 pm
by sphere
SOme people manage to still use only the command line for the Android SDK, the older version had a small GUI to just install the needed.
For new commers, install android studio plus the needed sdk's, install java jdk and keep track where i is installed, install LC and set the correct installation folder for the Java jdk.

BX4 uses a BASIC kind of language, but seems to rewrite it all to java internally.
For my project (for the mobile part) I still have to make up my mind if I'm going to use Flutter (which I'm also playing with) or B4X, it will not be LC unfortunately. It could have saved me time.

Re: Android Studio - Additional JDK not needed (Solution to Java is none error)

Posted: Sun Dec 03, 2023 2:47 pm
by ckacadv
Hi, i'm using LiveCode 9 .6 .1 and android studio giraffe. I installed sdk from android studio and i have set sdk path in livecode to
C:\Users\ (username) \AppData\Local\Android\Sdk
Livecode is not complaining about that but it says jdk path is none and when i try to save as standalone android app i get error "Could not compile service support class". I just don't know what to do anymore.

Re: Android Studio - Additional JDK not needed (Solution to Java is none error)

Posted: Mon Dec 04, 2023 7:10 pm
by jacque
Studio installs a newer version of Java. LC needs Java 1.8. Check the versions you have and delete anything newer.

Re: Android Studio - Additional JDK not needed (Solution to Java is none error)

Posted: Mon Dec 04, 2023 8:01 pm
by Klaus
You mean JAVA 8, right?

Re: Android Studio - Additional JDK not needed (Solution to Java is none error)

Posted: Mon Dec 04, 2023 11:26 pm
by SparkOut
Java SDK v 1.8

Re: Android Studio - Additional JDK not needed (Solution to Java is none error)

Posted: Tue Dec 05, 2023 10:05 am
by Klaus
Ah, sorry, misunderstood this.

Re: Android Studio - Additional JDK not needed (Solution to Java is none error)

Posted: Wed Dec 06, 2023 1:01 am
by FourthWorld
sphere wrote:
Tue Jun 22, 2021 9:38 pm
Take a look at B4A how beautiful they integrated this sh*t in their 100% free program (also for commercial use). Install Java JDK, install Android Studio, start B4X and add/upate all needed sdk from within, no need to open Android Studio.

LC could win so much users by making it even more easier, same counts for people with (code)signing and creating keys for iOs/Apple/Windows/Android apps, should been taking care of inside LC. For Apple it's now greatly taken care by Matthias, this was a job for LC in my humble opinion.
Well said.

But I doubt anyone with decision-making authority will ever see your words.

I communicate weekly with the leaders of so many vendors across social media, from software companies to game publishers to the CEO of Netflix and Grady freaking Booch. But in this era where marketing is a conversation with fans, I can't recall the last time Kevin just hung out with his audience, even in his own venues.

But you're right. If you're selling a tool on ease of use, ease of use is the priority.

Re: Android Studio - Additional JDK not needed (Solution to Java is none error)

Posted: Wed Dec 06, 2023 9:18 pm
by sphere
Hi, long time no see :)

Thanks!
Next to that if you image that (as far as I know) B4X is developed by 1 man only. And what its capable of.

Livecode was for me the easiest and fastest to develop, but missing some stuff. If you dive into Flutter or B4X, one gets the hang of it pretty fast.
Disadvantage of Flutter is that one often seems to be updating its code after updates due to breaking changes. But it runs really smooth on each platform. And both costs nothing (except a very low amount for B4X for iOs).

I hope that the team will add such implementations. I really loved Livecode.

Re: Android Studio - Additional JDK not needed (Solution to Java is none error)

Posted: Tue Mar 26, 2024 11:46 am
by trevix
Klaus wrote:
Sun Jun 20, 2021 2:52 pm
Here the pathnames on my successfull Android Studio installation:
Android SDK -> /Users/klaus2/Library/Android/sdk
## I also used the trick with an ALIAS of that folder
JDK path -> /Applications/Android Studio.app/Contents/jre/jdk

Maybe that helps.
Hello Klaus.
I'm having the same problem of "unsupportedClassVersionError", so I have done what you did.
Except that inside the "Contents" folder of Android studio I don't have a "jre" folder :shock:
I am on OSX 14.3.1 LC10
Any suggestions?
Screenshot 2024-03-26 alle 11.38.50.png