[SOLVED] On Linux: The chosen folder is not a valid Android SDK.

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
trinajstica
Posts: 5
Joined: Mon Feb 02, 2015 1:01 am

[SOLVED] On Linux: The chosen folder is not a valid Android SDK.

Post by trinajstica » Wed Jul 21, 2021 10:04 am

Hello,
I have two computers, Windows (all working) and Linux (problem with Android SDK). What to do more? Picture is attached.
I'm using LiveCode Community 9 6 2. Before I posted this message I was searching throu forums, and checked lessions, but... Is this possible some sort of LC bug? BTW: Java is working, so there is no problem...

Anway, same problem on diffrent distros (Ubuntu, Arch, POP!OS, OpenSuse).

Thanks in advance!
Attachments
pic2.jpg
Last edited by trinajstica on Wed Jul 21, 2021 6:04 pm, edited 1 time in total.

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

Re: On Linux: The chosen folder is not a valid Android SDK.

Post by Bernard » Wed Jul 21, 2021 12:01 pm

Assuming that the folder indicated in AS as the SDK path exists (and that the designated folder is not empty) -- could it be a case-sensitivity issue?

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

Re: On Linux: The chosen folder is not a valid Android SDK.

Post by Bernard » Wed Jul 21, 2021 12:11 pm

In this discussion the final part reads "sdk" (lower case)
https://quality.livecode.com/show_bug.cgi?id=22629#c3

/Users/youruser/Library/Android/sdk/

On my Mac it's also lower case.

Also, I have the "Android SDK Command-line Tools" installed in AS.

trinajstica
Posts: 5
Joined: Mon Feb 02, 2015 1:01 am

Re: On Linux: The chosen folder is not a valid Android SDK.

Post by trinajstica » Wed Jul 21, 2021 3:44 pm

Thank you for your replays. It's not permission issue, and I renamed the Sdk to the sdk, same thing. I even copy all to NTFS partition, where is no permissions involved. Even installed all whatever Android Studio offers... idk what is wrong here.

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

Re: On Linux: The chosen folder is not a valid Android SDK.

Post by Bernard » Wed Jul 21, 2021 4:41 pm

I think the only thing you can do is dig into the scripts of the IDE and find where "enabled support for 10" occurs.

That should tell you why it is that LC is thinking there's not a valid SDK at that location.

I would be more helpful but today's one of the days when breakpoints aren't working for me :roll:

If you have the LC Preferences pane open on the Mobile section, put your mouse over the "..." button where you choose the SDK location, then type ctrl +M to get to the Message Box. There paste

Code: Select all

edit the script of mousecontrol()
The editor will open at that script. If you put a breakpoint you should be able to trace through revIDEDeployAndroidIsValidSDK(it) and find where/why it is failing.

I'd be interested to know if you get to the bottom of it.

trinajstica
Posts: 5
Joined: Mon Feb 02, 2015 1:01 am

Re: On Linux: The chosen folder is not a valid Android SDK.

Post by trinajstica » Wed Jul 21, 2021 6:04 pm

Thank you for your suggestion. In short: In latest build-tools are missing dx and dx[.]jar. So I remove it and installed 30[.]0[.]3. Now it is detected all right and I can compile for android platform. Thanks!

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

Re: [SOLVED] On Linux: The chosen folder is not a valid Android SDK.

Post by Bernard » Wed Jul 21, 2021 7:22 pm

Thank you for digging into the details. Turns out I was already trying to help someone else with this, and I've pointed him to your discovery as a (possible) explanation for his problems.

trinajstica
Posts: 5
Joined: Mon Feb 02, 2015 1:01 am

Re: [SOLVED] On Linux: The chosen folder is not a valid Android SDK.

Post by trinajstica » Wed Jul 21, 2021 7:42 pm

No problem, without your pointers I would be still strugling with questions why and what is wrong... now I know.

Here is part of code failing:

Code: Select all

function deployIsValidSDK pPath 

....snip....

   if there is no file pathToDex(pPath) then
      --return "missing dex tool, make sure your SDK install has not become corrupted"
      return false
   end if
  
   return true
end deployIsValidSDK

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”