[Partially Solved]SDK root & JDK path: None

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Jellobus
Posts: 317
Joined: Tue Dec 10, 2013 2:53 pm

[Partially Solved]SDK root & JDK path: None

Post by Jellobus » Tue Jul 20, 2021 3:45 am

Hello,

LC can not find the SDK root and JDK path. It has been a very frustrating experience since I had to format my PC and Mac several times last weekend. I followed the lesson from the LC, but I had no luck. Is it a bug? As far as I remember, there was no issue with this setup process. I had no idea what to try now. Any advice will be appreciated. Please advice.

Thanks a lot in advance,

Louis
Last edited by Jellobus on Sat Aug 07, 2021 3:27 am, edited 2 times in total.

Bernard
Posts: 351
Joined: Sat Apr 08, 2006 10:14 pm
Location: London, England

Re: SDK root & JDK path: None

Post by Bernard » Tue Jul 20, 2021 8:44 am

I've been through this 3x in the past year: on Mac Intel, Win10, then Mac M1.

viewtopic.php?f=53&t=34837

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7210
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: SDK root & JDK path: None

Post by jacque » Tue Jul 20, 2021 5:43 pm

It wants Java version 8.x, nothing else will work. Is that what you installed?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Jellobus
Posts: 317
Joined: Tue Dec 10, 2013 2:53 pm

Re: SDK root & JDK path: None

Post by Jellobus » Tue Jul 20, 2021 6:27 pm

Hi Jacque, I downloaded jdk-8u291-macosx-x64.dmg

Bernard
Posts: 351
Joined: Sat Apr 08, 2006 10:14 pm
Location: London, England

Re: SDK root & JDK path: None

Post by Bernard » Tue Jul 20, 2021 6:39 pm

The link I provided explains how to fix this.

It's a year since I pointed out to LC staff that they need to change their instructions on getting Android studio to work.

Jellobus
Posts: 317
Joined: Tue Dec 10, 2013 2:53 pm

Re: SDK root & JDK path: None

Post by Jellobus » Tue Jul 20, 2021 6:51 pm

Hi Bernard, Thanks for your effort regarding this issue. but it's still not easy to understand the whole process.

First, I don't get what it means.. so I skipped this part. Could you do step by step explanation?
====
Update: forgot to mention that one needs to set the PATH environment variable so that it points to the relevant (home) directory for the sdk java tools. LC in launching those tools could include the full path to that home. For anyone trying to do what I've done, once the path variable is set then opening a new terminal one should be able to call
java -version
javac -version
and the OS should find those executables and launch them. My guess is that within the LC IDE is that these programs are called without a full path to them, hence the need to set the path.
====

Second, I downloaded all required files from the SDK manager then I used shift+cmd+g and put /Users/myName/Library/Android/sdk to find SDK. and it failed.
Screen Shot 2021-07-20 at 1.15.21 PM.png
Screen Shot 2021-07-20 at 1.15.21 PM.png (15.74 KiB) Viewed 9680 times
Third, For JDK Path, I copied and pasted "jre" folder into Android Studio folder (beside of "contents" folder) and I used shift+cmd+g and put /Applications/AndroidStudio/jre/jdk/Contents/Home but Finder does not allow show "jre/jdk/Contents/Home" in the Android Studio file. How to fix to show contents of the application?
Screen Shot 2021-07-20 at 1.40.09 PM.png
Screen Shot 2021-07-20 at 1.40.09 PM.png (14.62 KiB) Viewed 9680 times
Screen Shot 2021-07-20 at 1.22.24 PM.png
Last edited by Jellobus on Tue Jul 20, 2021 8:14 pm, edited 2 times in total.

Klaus
Posts: 13793
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: SDK root & JDK path: None

Post by Klaus » Tue Jul 20, 2021 7:06 pm

I created an ALIAS of the JDK folder inside of the Android Studio in the desktop!
THis way I could point LC to the correct folder(s)

Jellobus
Posts: 317
Joined: Tue Dec 10, 2013 2:53 pm

Re: SDK root & JDK path: None

Post by Jellobus » Tue Jul 20, 2021 7:27 pm

Hi Klaus, I tried but I couldn't point to the correct folder. If I chose a folder on the desktop, LC just did not respond. It neither shows a warning sign nor a success message.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7210
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: SDK root & JDK path: None

Post by jacque » Tue Jul 20, 2021 7:33 pm

I didn't do anything special when I updated to Java 8. I had to uninstall the old version, then I installed Java 8 in whatever default place it wanted. LC saw it there. I don't use Android Studio except to create the new specialized icons, so that app didn't matter. It really has no interactions with LC, it's just an interface to the stuff we used to use Terminal for. I still use Terminal to update packages, actually.

If you have any older versions of Java still installed, I'd remove them. LC may still be linked to one of those.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Jellobus
Posts: 317
Joined: Tue Dec 10, 2013 2:53 pm

Re: SDK root & JDK path: None

Post by Jellobus » Tue Jul 20, 2021 7:55 pm

The computer is formatted so that there are no other program files installed. There are only required programs from the LC lesson.

Klaus
Posts: 13793
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: SDK root & JDK path: None

Post by Klaus » Tue Jul 20, 2021 8:11 pm

Jellobus wrote:
Tue Jul 20, 2021 7:27 pm
Hi Klaus, I tried but I couldn't point to the correct folder. If I chose a folder on the desktop, LC just did not respond. It neither shows a warning sign nor a success message.
Hm, the trick with the ALIAS will allow me to navigate INSIDE of the "Android Studio.app" bundle to the correct folder
-> JDK Path: /Applications/Android Studio.app/Contents/jre/jdk

Bernard
Posts: 351
Joined: Sat Apr 08, 2006 10:14 pm
Location: London, England

Re: SDK root & JDK path: None

Post by Bernard » Wed Jul 21, 2021 12:06 am

Jellobus wrote:
Tue Jul 20, 2021 6:51 pm
Hi Bernard, Thanks for your effort regarding this issue. but it's still not easy to understand the whole process.

First, I don't get what it means.. so I skipped this part. Could you do step by step explanation?
====
Update: forgot to mention that one needs to set the PATH environment variable so that it points to the relevant (home) directory for the sdk java tools.
I'm not near my Mac right now.

What happens if you paste this into the Message Box

answer (shell("which javac"))

and press enter?

Fundamentally when it comes to converting a LC app to run on Android, LC has to call javac (the java compiler). To be able to call this, it either needs a path made explicit within LC's code in calling javac OR in calling javac LC can rely on the OS to find that compiler.

"which javac" will tell you if your OS is itself able to find javac.

As I've been saying for a year - LC need to fix the tutorial. Since LC tell users that installing Android Studio is the supported mechanism, and since Android Studio has its own JDK, then there should be no reason to complicate things with an additional JDK. I hate to think how many people would not be as persistent as you or I, putting hours/days into trying to get this to work.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: SDK root & JDK path: None

Post by FourthWorld » Wed Jul 21, 2021 12:55 am

I had thought that Lesson was updated some years ago, no?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Jellobus
Posts: 317
Joined: Tue Dec 10, 2013 2:53 pm

Re: SDK root & JDK path: None

Post by Jellobus » Wed Jul 21, 2021 4:09 am

Hi Bernard, I am even thinking request of a partial refund of the membership fee.:? It's nonsense... Anyways.
What happens if you paste this into the Message Box

answer (shell("which javac"))

and press enter?
It returns /usr/bin/javac

Bernard
Posts: 351
Joined: Sat Apr 08, 2006 10:14 pm
Location: London, England

Re: SDK root & JDK path: None

Post by Bernard » Wed Jul 21, 2021 9:10 am

Jellobus wrote:
Wed Jul 21, 2021 4:09 am
It returns /usr/bin/javac
I was going to ask you to do the same with this command, but it fails through the IDE but not in a Terminal window.

/usr/bin/javac -version

I get this as a response:

javac 1.8.0_242-release

Post Reply

Return to “Android Deployment”