[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

Re: SDK root & JDK path: None

Post by Jellobus » Thu Jul 22, 2021 10:00 pm

Bernard wrote:
Thu Jul 22, 2021 6:44 pm
What happens when you go to Livecode Preferences/Mobile Support and select the path for "Location of Android development SDK root"?
Yes, I could start Android Studio and downloaded all required files with SDK manager. If I select the path for Android SDK using cmd+shift+g (/Users/myName/Library/Android/sdk), LC 9.6.2 shows
Screen Shot 2021-07-22 at 4.56.24 PM.png
Screen Shot 2021-07-22 at 4.56.24 PM.png (16.21 KiB) Viewed 8135 times

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

Re: SDK root & JDK path: None

Post by Bernard » Fri Jul 23, 2021 6:21 am

Let's see if there are any missing files in Android Studio (the problem the other user had a couple of days ago).

In Finder,
Get Info
should list Android Studio's detailed size as: 1,736,443,637 bytes

In a terminal this command will count how many files are in and below Android Studio's top folder (in the terminal you need to "cd" into the Android Studio folder to run it"):

find . -type f -exec ls -l {} \; | awk '{sum += $5} END {print sum}'

For me it is: 1712

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

Re: SDK root & JDK path: None

Post by Jellobus » Fri Jul 23, 2021 5:18 pm

I also got Android Studio's detailed size as 1,736,443,637 bytes, and I am not sure that I did it right in the terminal. (Please understand that I am not a professional programmer.) I got 1736443605

Code: Select all

@My-Mac-mini ~ % cd /Applications/Android\ Studio.app 
@My-Mac-mini Android Studio.app % find . -type f -exec ls -l {} \; | awk '{sum += $5} END {print sum}'
1736443605
suineo@My-Mac-mini Android Studio.app % 


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

Re: SDK root & JDK path: None

Post by Bernard » Fri Jul 23, 2021 6:11 pm

Sorry. That was my mistake. I'd run a 2nd command to check that Finder was showing the same sizes as the Terminal. I then pasted that command here by mistake.

This is the command to show how many files there are beneath Android Studio.

find . -type f | wc -l

results in:
1712

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

Re: SDK root & JDK path: None

Post by Jellobus » Fri Jul 23, 2021 6:48 pm

Don't say sorry :) I am appreciating your effort. I'm the one who should say sorry to you. You are saving a lot of time of LC users.

Anyway, I got 1712 too.

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

Re: SDK root & JDK path: None

Post by Bernard » Fri Jul 23, 2021 7:32 pm

OK, so looks like your SDK is the same as mine. So almost certainly no missing files unlike the other person.

So the field labeled "Location of Android development SDK root:" is empty in your Preferences pane? And when you bring up the file dialog by clicking the button marked "..." , you cannot choose the location of the SDK, and that failing is what gives you the SDK error message?

If so then I'll try to talk you through this.

When the file dialog is open, press cmd+shift+G. When it says "Go to the folder:" type (or paste) the path to your SDK

/Users/myName/Library/Android/ (I'm taking this from the path you posted here earlier, it's back one level from

/Users/myName/Library/Android/sdk). Now you should see a list of files in the file dialog where one of the folders is "sdk". Click "sdk" then the button marked "choose".

This should get passed the first of the errors you've faced.

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

Re: SDK root & JDK path: None

Post by Jellobus » Fri Jul 23, 2021 7:36 pm

shift+cmd+G and pasted /Users/myName/Library/Android/ and it shows "sdk" only. There are no other folders other than "sdk". If I choose it, It returns the same error message.
Screen Shot 2021-07-23 at 2.54.48 PM.png
Screen Shot 2021-07-23 at 2.53.25 PM.png
Screen Shot 2021-07-23 at 2.53.25 PM.png (16.43 KiB) Viewed 8045 times

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

Re: SDK root & JDK path: None

Post by Bernard » Fri Jul 23, 2021 11:28 pm

OK. Then this suggests that your installation of Android Studio is incomplete.

Android Studio (at least on OSX) installs files in two different places: in your Applications folder and in the Library folder (as seen in the SDK path).

I think the lack of folders under /sdk means there are some components in Android Studio you have not installed. I'm not by my Mac now, but the Livecode Lesson for Android setup discusses those components. You get to the relevant place in Android Studio by looking at the Configuration.

Here's a screenshot from the other guy I was helping. His is on Linux, but you can see from that the various Android tools that need to be installed.

download/file.php?id=15176&mode=view

I'd suggest installing those tools (as he's done) and then try setting the SDK path again. Without looking at my Mac, I'm guessing those tools are installed into that folder under Library, and (unhelpfully) Livecode is telling you those tools are not in the SDK sub-folders.

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

Re: SDK root & JDK path: None

Post by Jellobus » Sat Jul 24, 2021 4:08 am

All files have been installed already but nothing is showing in that location except "sdk" folder. In the Android Studio, it shows SDK location as: /Users/myName/Library/Android/sdk

Should I delete all LC, Android Studio & JAVA files then install them again? If you suggest it, what LC, JAVA and AS versions do you suggest? and which one should I install first? Have you restart the computer after the installation of each file? I like to follow the exact installation steps you did. Also, I like to know your Mac OS version as well. I will update OS if necessary. Mine is 3.2GHz 6 core intel core i7 mac mini, macOS Catalina 10.15.7 Thanks a lot!

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 » Sat Jul 24, 2021 7:05 am

LC doesn't really need Android Studio and it is unrelated to the Java problem. AS itself isn't necessary for our purposes so you don't need to do anything about it right now. What I would do instead is remove all existing versions of Java to start with. There is more to removal than just deleting some files. Instructions are here:
https://www.java.com/en/download/help/m ... _java.html

Once you are free of all versions of Java, download version 8 from Adobe's web site. Quit LC if it is running.
https://www.java.com/en/download/ Run the installer. Allow it to install to its default location.

Relaunch LC and look in the Mobile pane in Preferences. On a Mac there should be no button to allow you to choose a location; there's a trick to make it show but you shouldn't need it and it was hidden on purpose. If Java is installed in the default location then LC should find it automatically.

That's all I did and Java was found, even though I hadn't installed Android Studio yet. In fact, I didn't install AS at all until much later when I needed to create the new type of app icon, which is still all I ever use it for.

I'm still on Mojave so hopefully this method works on Catalina too. If it doesn't then we need a LC team member to jump in and give suggestions.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

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

Re: SDK root & JDK path: None

Post by Bernard » Sat Jul 24, 2021 7:15 am

Library/Android on my install only has /sdk/. It's within the /sdk/ folder that the needed tools are installed.

Here's what is beneath /sdk/ for me:
Screenshot 2021-07-24 at 07.12.06.png
Does yours match this? I have to assume it doesn't since it seems LC gives you an error message when you select /sdk/ in the File Dialog.

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

Re: SDK root & JDK path: None

Post by Bernard » Sat Jul 24, 2021 7:24 am

jacque wrote:
Sat Jul 24, 2021 7:05 am
LC doesn't really need Android Studio and it is unrelated to the Java problem.
The problem is Jacque that LC Ltd have said that previous methods of configuring Android for LC are deprecated by LC Ltd. Installing/configuring Android Studio is the only route they discuss that is not deprecated. So that's the guidance that people are following. They're having problems because they are following LC Ltd's guidance. It's not like they've struck out alone and through some perverted sense of loyalty to Google they're in this situation.

I'd prefer not giving over 1.74gb to a tool I never even open (I only open it to try and help others having setup problems).

Once we see that Jellobus has got the files installed in /sdk/ then we can see if installing the JDK as recommended by LC works. It didn't work for me (and numerous others).

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

Re: SDK root & JDK path: None

Post by Bernard » Sat Jul 24, 2021 7:34 am

Jellobus,

here are screenshots of my Configure / SDK options.
Screenshot 2021-07-24 at 06.57.18.png
Screenshot 2021-07-24 at 06.57.22.png
So these are the options which resulted in that list of folders/files under /sdk/.

Hopefully these screenshots provide you with some information that explains what is missing from your setup.

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

Re: SDK root & JDK path: None

Post by Jellobus » Sat Jul 24, 2021 3:10 pm

I downloaded all SDK tools & platform files you have on AS. The differences are the latest Android emulator version 30.7.5 and Android SDK Build-Tools 31 are installed. Also, my SDK folder is missing "skins" and "system-images" folders.
Screen Shot 2021-07-24 at 10.01.10 AM.png
Screen Shot 2021-07-24 at 10.01.29 AM.png
Screen Shot 2021-07-24 at 10.01.54 AM.png

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

Re: SDK root & JDK path: None

Post by Bernard » Sat Jul 24, 2021 3:36 pm

It is mystifying.

I googled "Android Studio" "Missing files" and there were a number of discussions on it (not related to Livecode). But that's not so surprising with a complex product being used for a decade or so. Various solutions were offered to people, often they didn't work.

Post Reply

Return to “Android Deployment”