Mobile Support for ADT

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

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

daryl
Posts: 47
Joined: Mon Apr 29, 2013 11:43 pm

Re: Mobile Support for ADT

Post by daryl » Tue Jun 04, 2013 4:59 pm

Folks,

I received the following email this morning regarding bug report 10297 at http://quality.runrev.com/show_bug.cgi?id=10927
Maybe it will be useful to someone in this discussion.

---------------- bug report comment -------------------
Hi Daryl,

I added a comment to the lesson: "How do I become an Android Developer on a Mac?", indicating that there was an issue linking the Android SDK.
There is still an issue with regards to Windows, but this has been assigned and we are addressing that at the moment. See bug 10936.

Kind Regards,

Hanson
---------------- end bug report comment -------------------

Regards,

Daryl

Traxgeek
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 281
Joined: Wed Jan 09, 2013 10:11 am

Re: Mobile Support for ADT

Post by Traxgeek » Sat Nov 30, 2013 4:51 pm

realise this is an 'old' thread but I'm still having issues...

tried just about everything (over the past two weeks on and off (more on than off I may add) and I'm still nowhere...

this surely MUST be sorted... the fun / issues are supposed to be writing your app right ? Not trying to get the flipping thing to work in an Android SDK.

That apart it ticks me off that it seems just sooooo complicated / obtuse. The (often generic) advice from those who have gotten it going (by some dint of luck or sheer super human intelligence - experience) just adds to the frustration... try this SDk, try that SDK, remember to do this, don't do that... Must it really be this hard / difficult (read obtuse !) ?

I accept a degree of frustration is par for the course but... I'm off for a cool down while an older android act sdk downloads.... arrrrggghhhh !
I'm 'getting there'... just far too slowly !
Mac (Siera) and PC (Win7)
LiveCode 8.1.2 / 7.1.1

SparkOut
Posts: 2323
Joined: Sun Sep 23, 2007 4:58 pm

Re: Mobile Support for ADT

Post by SparkOut » Sat Nov 30, 2013 5:10 pm

With 5.5.4 and 5.5.5 anything above release 21.1 will not work to connect the android adk. I believe one of the 6.1.x releases is supposed to have fixed this, but I haven't tried as my commercial licence stops with 5.5.5 and some of my licence requirements mean I can't use the community version - although I probably should, in order to stay familiar with the changes when I can get a licence upgrade.

With 5.5.5 and release 21.1 the adk is found successfully and compiles and builds ok, but the application launches just a black screen. With 5.5.4 it works successfully. There are some other problems with 5.5.5 (like revBrowser commands causing a crash). So I'm stuck with 5.5.4 for the foreseeable future.

Traxgeek
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 281
Joined: Wed Jan 09, 2013 10:11 am

Re: Mobile Support for ADT

Post by Traxgeek » Sat Nov 30, 2013 6:31 pm

Hi,

:oops: should have said ( a little sign of the frustration here ) I'm using LC 5.5.4, 6.1.x and 6.5.latest all commercial releases at the moment... all on a Mac mini using Mavericks.
right...
Tried with the 'stock' (latest - just download from the android developers page) SDK - so the latest I guess - can't remember the ver # exactly tho' - 22?). I note this comes bundled with Eclipse. Tried this many times, many guises...

Initial problems came with Java (or, more specifically, it not being installed correctly on my Mac - seems Mac removed Java due to various privacy issues some while back)
So, removed everything and installed Java. Which then, of course, told me there was an update available. Knowing no different, I let java do its stuff! Currently, I've left Java on Ver JRE7 - but finding out the ver of this isn't easy (clicking on Java Control Panel (bottom of the prefs in Mac) I find it only reports the version of the Control Panel (1.0) NOT, Java.... Anyway, reverting to my download file I see it's ver 7...

Right, Now download the Android ADK SDK... Like I say, knowing no better I did this with the most up-to-date version I guess and... whilst it downloaded and installed itself, and I could 'link' to it via LC prefs|Mobile setting I kept getting the Froyo error...

After various attempts I reverted back to Android and Eclipse. Eclipse fires up and runs fine... However, trying the AVD manager then gave me problems... [1] when the android sdk fires up, unlike other app, the mac toolbar/menu for the ADK does not display/activate itself until you select (give focus to) some other app (e.g. safari / finder) and then revert to the newly opened ADK window... the toolbar then miraculously enables itself...

Having found that I select AVD manager (Tools on the menu) and create an AVD (not really sure what ALL the settings do... (can't find a full description/ tutorial)... but, hey ho...). Upon selecting Start (the newly created AVD) I find, 'wow' this works... Then 'Failed to load application Class' appears and the AVD fails... Now then, I THINK the AVD worked the first time (maybe it was only after it had run the first time and, all cocky, I went back to LC and ... well, played...) but... maybe not...

I start looking for answers with the AVD issue... thinking 'let's get the ADK/AVD Manager working first and THEN revert to LC... only to find there's an issue with the SDK and twin (more than one) screen(s) on my Mac (and Windows too I believe - though I haven't had the heart to try it yet - that pleasure remains for me...)
Anyway, after a lot of mucking about I find I need to reset the 'window.x' setting in the particular AVD's setup file but... where the heck is the .android folder? - Aha, it's hidden (along with most 'protected' files on a Mac and needs to be un-hidden via a command line in terminal... (I'm starting to lose the will to live...). Not as simple as Windows - Show Protected/Hidden files option...

Fixed this and... still no go...
So, I then deleted ALL (I'd created two) AVD's and started again... Not quite so simple because now that the ADK had failed in its attempt to fire up my selected AVD, it wanted to hold onto it... but of course it wasn't available for me to shut it down which mean the ADK thought it was still valid in play and prevented deletion... Compromise : delete it manually from the (now, not so hidden) .android/avd folder...

Anyways... even longer story short... found a reference along with many others to try an earlier version of the ADK... hmmm... not so easy to find... but (thanks to the forum; specifically, Simon, I think). I did find a link to it and downloaded it. Note - this is different in that it does not contain an Eclipse folder bundled with the ver 22 ADK...so... I start selecting the components I need... and I accept the licence agreements... and I download... blow me ! The flipping thing has updated itself to ver 22.... :evil:
I DID read that I was not to allow it to update itself BUT didn't see any option to allow/dis-allow up to that point... so, thought it must be a property of the ADK's 'Preferences' section... WRONG ! Nuffin there !!! (big sigh...)

I then deleted the ADK and started again, to note that there was a kind of reference to an upgrade to rev22 (from 20.0.3) AFTER I'd elected to install my selected packages/components (This is found on the Licence Acceptance (2nd) page of the SDK install)... So, reading 'Package Description' of 'Android SDK Tools, revision 22' will update and replace rev 20.0.3 with rev 22 I refused to accept the licence for that one package, but elected to accept ALL the others that were proposed... and waited for the various packages to download and install...

Wrong... The components (once again - my poor machine, internet connection and patience - don't know if I can take much more tea while I wait ! ) start to download... only to fail with 'Stopping ADB Server (Code -1)' and then (naturally enough I guess) 'Starting ADB server failed (code 255)'

Honestly...

I'll go back and try again (doing something different I hope) and will report my results.

I guess I just fail to see any and good, real or justified excuse for this kind of 'fluffiness' - I know, I know... frustration is part of the 'fun' and if it were easy we'd all be doing it but... but hey... come on... this borders on ridiculous. I'm not 'blaming' LC / RR per se (wouldn't do any good anyway) - well, not solely, LC (I LOVE LC - no, really I do - for Windows and Mac apps) - but surely there just has to be some justification for more effort to be spent on this part of the process if LC is truly to be taken seriously for mobile app development... By contrast, like I say, deployment to PC/Mac is (ridiculously) simple by comparison !

Anyway I'm off to try something new with the ADK...

I'll update this thread with my success / failures just to try and save others some of my pain / frustration...

UPDATE-1 :
Even with the install/build failure(s) noted just above, the ADK DID allow me to create an AVD via the AVD manager for my Transformer Infinity which it then started :D
I then note with some surprise (but never-the-less with enthusiasm and relief) that LC did indeed 'see' the Test Device in the Development menu AND allow me to Test my app to it :D BUT (and this is where my new found happiness becomes short lived !) , after displaying the default (I guess) android logo, reports it was 'Unable to build app for testing: could not compile application class'.... Arrrgggghhhh - so close... and yet... with no real idea as to why (well, not yet...) Back to the drawing board...

This is supposed to be fun... it makes me wonder; is this really fun, or am I just so relieved at the end (when I do manage to get things going) that I simply push all memories of the pain to one side and focus on the 'now then...'...

Nevermind... onward and upward !
I'm 'getting there'... just far too slowly !
Mac (Siera) and PC (Win7)
LiveCode 8.1.2 / 7.1.1

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Mobile Support for ADT

Post by Simon » Sun Dec 01, 2013 3:10 am

Hey Traxgeek,
Not sure if this helps any, but you have my sympathies. It should not be that difficult, I mean it's installing software not a relationship!

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Traxgeek
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 281
Joined: Wed Jan 09, 2013 10:11 am

Re: Mobile Support for ADT

Post by Traxgeek » Sun Dec 01, 2013 1:01 pm

Thanks Simon, Not sure it this will help anyone but... here goes... try not to flame me guys !

Hmmm…

There are a LOT of things I do not understand here - too many in fact and . . . well . . . !

EXAMPLE 1 : What is the difference between Android SDK Tools and Android SDK Platform-tools ?
EXAMPLE 2 : How to download and keep (prevent from updating) a version of the Android SDK Tools less than the most current ?

So…
I used an earlier version of the Android SDK (no Eclipse bundled with it - linked to higher up in the is thread).
I copied it to my Android Folder in my Documents folder.
I ran the ‘android’ file that is to be found in the ‘Tools’ sub folder of the android-sdk… folder (which I had just downloaded and copied to a place I liked…)

So, lets look at the resulting Android SDK Manager window that pops up…
What ‘pops up’ / is displayed is a File / folder selection window… displaying a list of files / folders that have already been installed / can be installed - and their updates…
Top of said displayed list is the ‘Tools’ folder.
Some of the option on this card or quite obscure and appear to do nothing (example : 'Updates' tag...)

Now, Like I said, I don’t have a scooby as to what the difference between Android SDK Tools and Android SDK Platform-tools is…
The first states it is at Rev. 20.0.3 (that’s good !) BUT there is an update available (NO - don’t do it !!!) and
the second states it’s at Rev. 16.0.2.
Further down the list are the various API files…

When I elected to download and install the Android SDK Platform-tools (NOTE : I did NOT elect to download the Android SDK Tools Rev.20.0.3 Upgrade to rev. 22) along with the APIs for ICS (API 14 IceCreamSandwich - Android 4.x), for JellyBean (API 11 - Android 3) and for FroYo (API 8 - Android 2.2 : REMEMBER this is the one that LC really, really, really needs ! ) and hit ‘Install packages’, and then ‘Accept All’, I received some (incomprehensible at the time) error that basically (I think) told me that parts of my selected install were dependent upon a file that wasn’t yet installed… BUT, none-the-less, was a file I HAD elected to include in my download/install process… Hmmm…
So, I cancelled the pending install and reverted back to the original SDK file selection window where I elected to simply install the Android SDK Platform-tools (Rev. 16.0.2), hit ‘Install packages’ and then ‘Accept All’ (Licences) and then ‘Install’ and… all cool there (OK….)
So, I then elected to install my original selection of APIs , but one at a time (I really don’t know if I could then have done them all (at that point) at the same time… but, what the heck…
Anyways, within 15 minutes, I had installed the Android SDK Platform-tools (Rev. 16.0.2) and the various APIs for Android, 2.2, 3 and 4 (to get me going - don’t really know if I need them all but I do know my ASUS Transformer is on ICS and… well, why not ? Gives me some 'coverage' AND has ‘proven’ I can come back here (to the Android SDK Manager) and load more / different APIs should I ever be inclined to ;-)

OK… So now for the AVD Manager…
Where’s that pesky Android SDK Menu bar ? Dunno if this is just a Mac thing but… I needed (still need) to select some other app (in my case I clicked back to Finder / Explorer) and then re-clicked on the 'Android SDK Manager' window. It got the focus (and my message that pretty soon it was all gouing out the window) and… wow… displayed its Menu bar for me. On the right hand side of which is the 'Tools' option and, in there, is the 'AVD Manager' option… Phew !!!
I selected the 'AVD Manager' (Manage AVDs) and hit ‘New’. I then made up some (basically cock-n-bull) settings, In fact I (1) gave my device a name (ASUS in my case), (2) a target (for simplicity, although I know the ASUS is on ICS/Android 4.x) of Android 2.2 - API Level 8, (3) enabled the ‘Snapshot’ (NOTE - THIS IS (from various posts) APPARENTLY VERY IMPORTANT), didn’t really understand the rest of it (read; just getting past the point of caring for a basic test and am totally unsure as to the importance of setting any of them, let alone setting them incorrectly !) and hit ‘Edit AVD’ (Again, no idea why I should select ‘Edit’ again, surely, this should be ‘Save’ or ‘Commit’ or ‘OK’ (it is right next to the only other option - the ‘Cancel’ button)… Anyway, it's 'Edit AVD'... (just hit it)...

So… Now to start the AVD…
I selected the newly created AVD (called ASUS) and hit ‘Start’.
A small progress window popped up, telling me I was a very naughty little boy and that I r ally should upgrade for the complete AVD to function absolutely correctly… but… what the heck (bearing in mind LC's issue with rev. 22)… ) and, lo-and-behold, my Virtual device pops up…

Don’t get too excited at this stage ! The AVD actually takes quite a while to FULLY load… in my case a black AVD screen pops up (looking good), eventually (2 - 3 mins) it’s populated with an ‘Android’ logo and a long while after this (another 2 -3 mins) it's replaced with a kind-of Android wallpaper and start button etc…

NOW, surely, we’re cooking…

So, now that I think everything’s started up and is ready for LC to detect it, I fired up LC (I’ve tried 5.5.4, 6.1.x and 6.5 - all commercial editions) and made sure that the Android Mobile Support properties are correctly set / a valid Java install (JDK) is indeed still detected…

All looked good, but I didn’t trust LC so… went and told LC where to find the Android SDK again (ADVICE : sometimes, it would appear you need to point to the basic android sdk folder (something like ‘android-sdk-mac…’) and other times to the ‘Tools’ folder within the ‘android-sdk-mac…’ folder (I guess this is dependent as to where google has elected to put the file(s) that LC needs !) so, if you get the ‘Froyo error’ upon selecting one folder, just do it again with a different folder (‘normally, for me, Tools’) within the android-sdk-mac…’ folder…
Anyway, no error and the JDK path seemed believable so…

My App.
I loaded my App, and, there it was, in the LC IDE. OK… deep breath… I then selected ‘Development’ and ‘Test Target’ from the LC menu bar and.. good grief… there’s my AVD ! :-) Excellent. OK… Select my AVD (some obscure ‘Android emulator - 5554’ name, that wasn’t there before I created the AVD from within the Android SDK Manager). Then I selected ‘Development’ (from the LC Tools menu again) and ‘Test’ (‘Test’ is just above the ‘Test Target’ option in said menu)…

and… aha, the Standalone Bulder pop-up is displayed with the ‘Building Classes…’ info… followed with the really really (un) helpful … ‘Unable to build app for testing : could not compile application class’ error. :-( Arrrrgggghhhh !!!

I HATE losing… but in the interests of staying (relatively) sane and not shouting at everyone around me I now bow my head in shame and sheer frustration... and walk away !

My day job : Radio, Radar and Electronic warfare where I may spend weeks (months) under water maintaining and operating defence equipment. The equipment I use is far more complex and far more convoluted whilst operating in totally inhospitable conditions but it (although often being highly classified) is far simpler to get going and maintain than this… I have absolutely no problems with complexity - i DO have a problem with crap documentation and poorly thought out implementation. I could rant for a while on this… I won’t !

The only reason I have gone to so much trouble here is (apart form the fact that I started writing this as I went along - in the vain hope I may be able to be of some use to other poor souls) I hope it may help someone figure out what to do / not to do / what to try / not to try with regards to LC and the Android SDK (maybe even to detect, what I (and many others here) have been / are doing incorrectly).
I fully appreciate the complexities of developers interfacing multiple (LC and Android SDK) code bases - but surely there is a degree of inherrent responsibility to ensure that ones code base does integrate with another (external) one IF that is integral to ones USP.

When I gain the will power to come back to this I will revert to this thread and update it with a working methodology, in the meantime… back to LC with Windows and Mac. . .

Good luck !
Last edited by Traxgeek on Wed Dec 04, 2013 4:19 pm, edited 2 times in total.
I'm 'getting there'... just far too slowly !
Mac (Siera) and PC (Win7)
LiveCode 8.1.2 / 7.1.1

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: Mobile Support for ADT

Post by LCNeil » Tue Dec 03, 2013 1:24 pm

Hi Everyone,

A fellow LiveCode user (Ian) has brought this forum topic to our attention. Lets see if we can help get everyone up and running.

We have created an Android Setup video that explains the steps required to setup Android in LiveCode. This can be viewed here-

http://www.youtube.com/watch?v=83qrKr9bR3M

Although the video is recorded on the Mac Platform, the steps are almost identical with any differences being explained in the video.

In regards to the “Could Not Compile Application Class” error, this generally occurs when there is a discrepancy in the Android - LiveCode setup. The most common being that the Android SDK has become unlinked from LiveCodes mobile preferences. Please check this is still linked.

LiveCode also looks for the specific folder when deploying to Android-

C:\Users\"your username"\AppData\Local\Android\android-sdk\platforms (Windows7)
/Users/Neil/Documents/android-sdk-macosx/platforms (mac)

(please note that this is the default install directory and will different if you set it as anything other than this)

The directory that contains the required Android 2.2. files is called "android-8". If this is not present then it will throw the error that your are experiencing.

I have gone through the above processes on a fresh windows 7 virtual machine, and was able to setup Android deployment without any issues.

If you still experience issues after trying the above, please post a reply and we will attempt to assist further

Kind Regards,

Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
--

Traxgeek
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 281
Joined: Wed Jan 09, 2013 10:11 am

Re: Mobile Support for ADT

Post by Traxgeek » Wed Dec 04, 2013 6:06 pm

Hi Neil,

Thanks for your response. Great video - got me kinda all fired up again - you make it look soooooo easy !
So much so, I'm off to give it another go ! (whilst taking notes).

My first thoughts (NOTE : I'm currently a Mac user !) :

Mac OS X and Java :
Oracle's Java version 7u25 and below have been disabled by Apple on OS X. However, 'updating' to the latest Java release will allow Java to be run on Mac OS X.
I write this purely so that BEFORE users start to install the Android ADK/SDK they should ensure they do in fact have the Java Runtime Enviroment (JRE) installed. This can be verified (or not) by calling up the Apple | System Preferences window and looking at the bottom of the page. If Java is installed, then it should appear here - in my case next to the 'Flash Player' plugin...

Android ADK/SDK Download :
Around the time of my troubles, upon navigating to the Android Developer pages to download the Android SDK, one is 'hit' with the huge blue box Android SDK logo labelled 'Download the SDK - ADT bundle for Mac'. There are various posts and videos showing one to do just this... But, on the contrary, you suggest that one ignore this enticing android box, navigate a little further down the page and use the 'Use an existing IDE' option and then select the 'Download the SDK tools for Mac'. After agreeing to google's Ts&Cs one can actually start the download. Excellent. This is, in fact, the android_r 22.3 zip for mac download. To date, others, on various forums, have stated that revisions above 20.xx are a non-starter.... so, let's see...

Once download is complete, I dragged the newly created 'android SDK' folder to a suitable location, navigated to the 'Tools' folder within it and started the 'android' script to fire up the 'Android SDK Manager'. As far as I'm aware I followed the video precisely (rewinding a number of times to check)...

The SDK installed its various dependancies (as per the vid) and I was able to create an AVD.

All well and good then. I didn't want to start the AVD - rather I just wanted to build my app for android... so fired up LC 6.5.0 commercial and made sure the Android SDK section of the Mobile Support tab's contents was pointing at the 'Tools' folder within the SDK folder and... it worked... and... the JDK path was similarly detected and displayed. All well and good...

Now for the bad news... same '... could not compile application class' error. :twisted:

Just out of curiosity, I then killed off LC 6.5.0 and fired up LC 5.5.4 and failed to even succeed in pointing the Mobile Support tab's contents to a valid 'Froyo' folder (the same path that 6.5.0 likes, not so with 5.5.4) !

I'm totally lost again...

I'm aware this isn't simple and that LC/RR are interfacing the LC SDK with a third party / Google SDK and therefore, most likely this is not specifically an LC/RR issue (except for the 5.5.4 / 6.5.0 discrepancy) but, all the same...

All I can currently think of doing is removing LC, removing the android SDK and removing Java. Then restart from the beginning... but would that be any good ? For me this is another afternoon of frustration and inefficiency which is not your fault... I simply don't know what to do in order to progress matters... Worse, I don't fully understand the error messages and so am unable to help myself... very frustrating...

Ideas please ?
I'm 'getting there'... just far too slowly !
Mac (Siera) and PC (Win7)
LiveCode 8.1.2 / 7.1.1

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

Re: Mobile Support for ADT

Post by jacque » Wed Dec 04, 2013 7:52 pm

Don't point mobile Preferences to the Tools folder, the reference needs to point to the root Android folder. On a Mac it's named "android-sdk-macosx". That should fix it.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Traxgeek
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 281
Joined: Wed Jan 09, 2013 10:11 am

Re: Mobile Support for ADT

Post by Traxgeek » Thu Dec 05, 2013 8:43 am

Hi Jacque,
Unfortunately not.
Tried each folder available (within the heirachy). LC refuses (froyo error) to accept all but one. In fact 5.5.4 refused the folder 6.5.0 accepted ! Very strange ...
Anyway, my understanding is that LC simply won't accept an 'invalid' (incorrect) folder and tells you all about it with its 'froyo' error... Maybe not...

Trouble is each attempt takes so long to download / update / configure... Woke up in the middle of the night thinking I'll try my MacBook pro instead (to date, I've used only mr Mac mini). Both are on Mavericks tho... give it a go this afternoon - meetings all day !

I'm coming to the conclusion (reading the forums etc) that this isn't a single issue problem... but various issues acting together : platform, OS version, LC version, JDK version, Android SDK revision, USER (me)....

It would be interesting to know how others fared using the video on a new / virgin install.

I'll continue whilst apologising (again) should my frustration come accross too strongly...

Regards.
I'm 'getting there'... just far too slowly !
Mac (Siera) and PC (Win7)
LiveCode 8.1.2 / 7.1.1

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: Mobile Support for ADT

Post by LCNeil » Thu Dec 05, 2013 10:05 am

Hi Traxgeek,

Thank you for the in depth report. We will hopefully get you up an running with Android development soon!

The Revision 22+ of the Android SDK is not compatible with LiveCode 5.5.* I believe this was fixed in LiveCode 6.0.2 so this is why LiveCode 5.5.4 throws an error when you select the Android SDK folder.

I am going to upload my versions of the SDK to some webspace for your to download. This should rule out any SDK related issues. I'll post a link to this here once it has uploaded.

In the mean time, it might be worth creating a new user account on your Mac system and then trying to setup Android deployment again. To save time you should be able to copy your current Android SDK to this new account.

Keep us posted on how you get on with this.]

Kind Regards

Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
LiveCode – Realize fast, compile-free coding


LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: Mobile Support for ADT

Post by LCNeil » Thu Dec 05, 2013 2:24 pm

Hi Traxgeek,

Here is a link to my SDK (Android Revision 23). Its a rather large download so it could take some time :)

I would recommend placing this is your "Documents" directory and then linking LiveCode to this. Hopefully this and/or the new user account option will give us some leads..

http://techsupport.on-rev.com/android-sdk-macosx.zip

Kind Regards

Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
LiveCode – Realize fast, compile-free coding


Traxgeek
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 281
Joined: Wed Jan 09, 2013 10:11 am

Re: Mobile Support for ADT

Post by Traxgeek » Thu Dec 05, 2013 5:49 pm

Thanks Neil,

Downloading now. Will revert to this thread when I have some (hopefully great) news !

Thanks again - appreciated.

Regards
I'm 'getting there'... just far too slowly !
Mac (Siera) and PC (Win7)
LiveCode 8.1.2 / 7.1.1

Traxgeek
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 281
Joined: Wed Jan 09, 2013 10:11 am

Re: Mobile Support for ADT

Post by Traxgeek » Thu Dec 05, 2013 7:18 pm

Hi,

So, writing this up as we go...

Deleted (to Trash) my existing android sdk folder.
Downloaded your zip. (1810Hrs)
Extracted the contents.
Moved the resultant 'adt-bundle-mac-x86_64-20131030' folder to my Android folder in my Documents folder i.e. to : 'Documents/Android/adt-bundle-mac-x86_64-20131030'
Navigated to the 'tools' folder within the 'sdk' folder (adjacent to eclipse - the download was an 'eclipse/adt bundle' within the 'adt-bundle-mac-x86_64-20131030' folder.
Ran the 'android' script by clicking it...
Noted that 'Android SDK Tools' (Rev. 22.3), 'Android SDK Platform-tools' (Rev. 19) and 'Android SDK Build-tools' (Rev. 19) are reported as already installed...
OK - Selected Android 2.2 (API 8 ), Android 2.3.3 (API 10), Android 3.1 (API 12) and hit the 'Install 10 packages...' button.
Accepted the licences.
Hit 'Download'...
... and waited... took a while but all 10 packages were reported as being installed... and loaded... (1843Hrs)... so far, so good...

Fired up LC 6.5.0 commercial.
Loaded an (in build) app...
Select Preferences | Mobile Support and set the location of 'Android development SDK root' : 'Documents/Android/adt-bundle-mac-x86_64-20131030' and 'froyo' error - which is (light dawns) understandable in that this install is a bundle so... need to go one deeper : 'Documents/Android/adt-bundle-mac-x86_64-20131030/sdk' (that works !) and the JDK path is auto filled. Great stuff ! >>>>> That clears up one issue mentioned many times on the forums - if the 'adt...' folder is bundled (with eclipse) then one HAS to select the 'sdk' folder within the 'adt...' folder (and alongside 'eclipse') in order for LC (6.5.0 commercial) to find the package(s) it wants... (naturally, this isn't necessary if the 'adt...' folder simply contains the 'sdk' and 'tools' folders - so, before, we offer help as to where to find the required files for LC we need to know the folder structure; more precisely, we need to point LC at the folder immediately above the tools folder within the 'adt...' folder. Please correct me should this be incorrect - no more 'mis-direction', this is involved enough as it is.

The bad news, however, is that I still then receive the '...could not compile application class' error on trying to build my standalone for android...

Like I say in a previous post, I feel pretty sure this is a 'multi-issue' problem; assuming Neil posted a properly working / tested 'adt...' folder (there's no reason you wouldn't Neil ! - I'm simply trying to be factual) then there MUST be a problem with (my) Mac OS X (Maverick) or, (my) JDK install or (my) LC 6.5.0 (commercial) install or the selection of APIs (I) elected to download or some issue caused by having downloaded multiple instances of the adk... (although I did remove to trash each previous instance before I downloaded and extracted any 'new' 'adk...' folder...

So, I'm still a little 'lost', although I'm favouring the latter... Which leads me to two questions :
[1] If I simply 'Move to Trash' an instance of the 'adt...' folder does it leave any ghost files (that I can't readily see) that are maybe corrupting (in some way) a future download/install or not...
[2] has anyone actually succeeded recently installing the adk bundle (dated 20131030 or newer) on a Mac, running Mavericks as a new / virgin / first-ever-time install ?

Which then leads me to one other question that I guess only Neil (and other RunRev techies) may know - namely, precisely what is upsetting LC 6.5.0 (commercial) enough for it to produce the '...could not compile application class' error upon trying to build a standalone - remember, the sdk is reported as being found OK as is the JDK (this was in Preferences | Mobile Support)... If LC is 'happy' at the Preferences | Mobile Support | Android development SDK root level then why is it not happy when I try to build ? ? ?

Sorry for the long winded post, but, the more info I can give you guys, the more I start to understand and the more you are likely to be able to help / point those like me in the right direction... at the moment I'm simply trying the 'monkey see... monkey do' approach without much understanding of the 'why', therefore, if anything goes wrong I'm totally unable to help myself... which, to be truthful, is a horrible feeling...

Back to you - hoping you'll have some ideas / be able to kick me in the right direction... (in the meantime, I'm off to try all of this on my (brand new/2013) MacBook pro (running Mavericks)... I'll revert... FYI : Eclipse, as a standalone / nothing to do with LC, fires up and runs perfectly; might help, might not. (1919Hrs : 1hr 10mins later !)
I'm 'getting there'... just far too slowly !
Mac (Siera) and PC (Win7)
LiveCode 8.1.2 / 7.1.1

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: Mobile Support for ADT

Post by LCNeil » Fri Dec 06, 2013 5:24 pm

Hi Traxgeek,

Thank you for the fantastic report! Its great to see great amounts of detail when trying to track down specific issues.

The Android Zip bundle I supplied should have extracted to simply "android-sdk-macosx" with all Android Packages Pre-installed within this directory. Can I just double check that you extracted the Zip file http://techsupport.on-rev.com/android-sdk-macosx.zip and not an ADT zip that you have downloaded from the Android developer site as a resulting folder called "adt-bundle-mac-x86_64-20131030" would suggest this.

What I am going to do is setup LiveCode for Android deployments on a fresh Mavericks VM install (first need to install previous version of OSX and then upgrade to 10.9 so it could take some time) and I will record the whole process from start to finish. Hopefully this will assist with tracking down this issue.

When the Android SDK is linked in LiveCode and a standalone is built, it uses the files contained within the platform/android-8 folder , files in the JDK (initially javac I beleive) and files within the LiveCode.app bundle (/Applications/LiveCode 6.1.2 Main Development.app/Contents/Tools/Runtime/Android). Any slight discrepancies in these could cause issues.

I am working on a technical support query with another use in relation to a similar issue on Windows. I have edited the stack that deals with standalone building to give additional feedback of what could be causing the "Could not Compile Application Class Message" This should be attached to this reply.

The stack is for LiveCode 6.5 commercial ONLY and should replace the existing file in the following directory

Applications/LiveCode 6.5.app/Contents/Tools/Toolset

Now, when you attempt to build for Android you should receive the same error message but with additional debug details added on the end. If you could post these here, it might help with tracking down the issue :)

Kind Regards

Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
LiveCode – Realize fast, compile-free coding
Attachments
revstandalonesettings.rev.zip
(358.6 KiB) Downloaded 121 times

Post Reply

Return to “Android Deployment”