Android Setup Config

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Android Setup Config

Bob Sneidar via use-livecode
Does anyone know the proper configuration for building an Android standalone on a Mac?  When I build the app, I get this:

“There was an error while saving the standalone application could not encode class bundle”

I followed the directions from this page (updated just a week ago):
  http://lessons.livecode.com/m/2571/l/27389-how-do-i-become-an-android-developer-on-a-mac 

But, I still get the same error.  The instructions say to get and install the latest versions of both Android SDK and Java SDK.  The instructions then go on to say that you can’t use the latest version of the Android SDK Tools, you have to use version 24.4.1.  This version is not available in Android Studio nor is it posted (that I could find) on the android website.  I did eventually find and download it.  But, what do you do with it?  After unzipping in, you have a new “Tools” folder.  I replaced the existing Tools folder at /Users/myComputer/Library/Android/sdk/ and restarted. But, that didn’t seem to solve anything.  Now LiveCode no longer recognizes the “android-sdk-mac_x86” folder as a valid Android SDK.  UG!  This will be day 3 trying to get an Android App Built!

MacOSX 10.12.2
LiveCode 8.1.3
Android SKD Manager – Revision 24.4.1
Java Version 8 Update 111

ANY assistance or knowledge you have would be greatly appreciated!

-Dan

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Android Setup Config

Bob Sneidar via use-livecode
Hi Dan,

1. Download version 24.4.1 and unzip it.
2. This only includes a "tools" folder, which has the 24.4.1 tools.
3. You have to launch the SDK Manager and install also the "Android 4.0.3
(API 15)". To launch the SDK manager just double click on "tools/android".
4. After that, you should be able to select the path to the sdks tools in
the LC Prefs, and build an android standalone successfully.

We are going to add support for the latest version of Android Studio in
LiveCode 8.1.5 RC1. This will hopefully make things easier.

Best regards,
Panos
--

PS: You can find older version of Android SDK Tools using those links:

http://dl-ssl.google.com/android/repository/tools_r[rev]-windows.zip
http://dl-ssl.google.com/android/repository/tools_r[rev]-linux.zip
http://dl-ssl.google.com/android/repository/tools_r[rev]-macosx.zip

Example for *v24.4.1* for *Mac*:

http://dl-ssl.google.com/android/repository/tools_r24.4.1-macosx.zip


On Fri, May 12, 2017 at 3:44 PM, Dan Friedman via use-livecode <
[hidden email]> wrote:

> Does anyone know the proper configuration for building an Android
> standalone on a Mac?  When I build the app, I get this:
>
> “There was an error while saving the standalone application could not
> encode class bundle”
>
> I followed the directions from this page (updated just a week ago):
>   http://lessons.livecode.com/m/2571/l/27389-how-do-i-become-
> an-android-developer-on-a-mac
>
> But, I still get the same error.  The instructions say to get and install
> the latest versions of both Android SDK and Java SDK.  The instructions
> then go on to say that you can’t use the latest version of the Android SDK
> Tools, you have to use version 24.4.1.  This version is not available in
> Android Studio nor is it posted (that I could find) on the android
> website.  I did eventually find and download it.  But, what do you do with
> it?  After unzipping in, you have a new “Tools” folder.  I replaced the
> existing Tools folder at /Users/myComputer/Library/Android/sdk/ and
> restarted. But, that didn’t seem to solve anything.  Now LiveCode no longer
> recognizes the “android-sdk-mac_x86” folder as a valid Android SDK.  UG!
> This will be day 3 trying to get an Android App Built!
>
> MacOSX 10.12.2
> LiveCode 8.1.3
> Android SKD Manager – Revision 24.4.1
> Java Version 8 Update 111
>
> ANY assistance or knowledge you have would be greatly appreciated!
>
> -Dan
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Android Setup Config

Bob Sneidar via use-livecode
In reply to this post by Bob Sneidar via use-livecode
Hi Dan,

You have to select the parent folder that contains the "tools" folder as
the “Location of Android development SDK root”, so in that case you have to
select "Desktop".

Or even better, move the "tools" folder (and every other folder that was
installed to your Desktop after installing the Android 4.0.3) into a new
folder called "android-sdk", and select "android-sdk" as the “Location of
Android development SDK root".

This folder should contain at least the following folders:
- tools
- platform-tools
- platforms

Hope this helps,
Panos
--


On Fri, May 12, 2017 at 5:26 PM, Dan Friedman via use-livecode <
[hidden email]> wrote:

> Panos,
>
> Thank you for the assistance!  But, didn’t work for me.   Here’s what I
> did:
>
> (1) Downloaded “tools_r24.4.1-macosx.zip” and unzipped it.  Now I have a
> “tools” folder on my desktop.
> (2) I double-clicked /desktop/tools/android.  The “Android SDK Manager”
> opened.
> (3) I selected “Android 4.0.3 (API 15)” and clicked “Install Packages”.
> (4) After the install was complete, I went back to LC 8.1.3 and in
> Preferences I selected the /desktop/tools/ as the “Location of Android
> development SDK root”.  Nada – invalid Android SDK.
>
> What did I do wrong?
>
> -Dan
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Android Setup Config

Bob Sneidar via use-livecode
In reply to this post by Bob Sneidar via use-livecode
Hi Dan,

Your setup sounds perfectly fine to me. Could you please check if there is
a file /tools/lib/sdklib.jar?

In the meanwhile I will check the version of the Android SDK Tools I have
installed in my Mac which works OK with LC.

Best,
Panos
--

On Fri, May 12, 2017 at 6:06 PM, Dan Friedman via use-livecode <
[hidden email]> wrote:

> Panos,
>
> Thanks again for the help, but I think I must be stupid.  I selected
> “Desktop” and still got “invalid Android SDK”.   So, I deleted everything,
> redownloaded “tools_r24.4.1-macosx.zip” and put it in it’s own folder at:
> /MacintoshHD/android-sdk/.  I then unzipped it and launched
> /MacintoshHD/android-sdk/tools/android.   I selected “Android 4.0.3 (API
> 15)” and clicked “Install Packages”.   When the install was complete, I
> went back to LC 8.1.3 and in Preferences I selected
> /MacintoshHD/android-sdk/ as the “Location of Android development SDK
> root”.  Once again, “invalid Android SDK”.
>
> The /MacintoshHD/android-sdk/ directory contains these items:
> add-ons
> platform-tools
> platforms
> sources
> system-images
> temp
> tools
> tools_r24.4.1-macosx.zip
>
>
> Any other thoughts or advise?  Maybe I’m destined to only make iPhone apps?
>
> -Dan
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Android Setup Config

Bob Sneidar via use-livecode
Hmm your /MacintoshHD/android-sdk/ directory should also include a folder
"build-tools". Since it is not present, you can install it using the SDK
Manager:

Launch tools/android
Find an item "Android SDK Build-tools" (should be at the top)
Tick the checkbox and select "Install packages"

After that the problem should be fixed :)

Best,
Panos
--

On Fri, May 12, 2017 at 6:34 PM, panagiotis merakos <[hidden email]>
wrote:

> Hi Dan,
>
> Your setup sounds perfectly fine to me. Could you please check if there is
> a file /tools/lib/sdklib.jar?
>
> In the meanwhile I will check the version of the Android SDK Tools I have
> installed in my Mac which works OK with LC.
>
> Best,
> Panos
> --
>
> On Fri, May 12, 2017 at 6:06 PM, Dan Friedman via use-livecode <
> [hidden email]> wrote:
>
>> Panos,
>>
>> Thanks again for the help, but I think I must be stupid.  I selected
>> “Desktop” and still got “invalid Android SDK”.   So, I deleted everything,
>> redownloaded “tools_r24.4.1-macosx.zip” and put it in it’s own folder at:
>> /MacintoshHD/android-sdk/.  I then unzipped it and launched
>> /MacintoshHD/android-sdk/tools/android.   I selected “Android 4.0.3 (API
>> 15)” and clicked “Install Packages”.   When the install was complete, I
>> went back to LC 8.1.3 and in Preferences I selected
>> /MacintoshHD/android-sdk/ as the “Location of Android development SDK
>> root”.  Once again, “invalid Android SDK”.
>>
>> The /MacintoshHD/android-sdk/ directory contains these items:
>> add-ons
>> platform-tools
>> platforms
>> sources
>> system-images
>> temp
>> tools
>> tools_r24.4.1-macosx.zip
>>
>>
>> Any other thoughts or advise?  Maybe I’m destined to only make iPhone
>> apps?
>>
>> -Dan
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Android Setup Config

Bob Sneidar via use-livecode
Hi Dan,


I have download the “tools_r24.4.1-macosx.zip” and unzipped it into a
folder android-sdk. Then launched tools/android and installed “Android
4.0.3 (API 15)”.


Now when I launch tools/android I see at the top:

(These are the installed versions)


Android SDK Tools: 24.4.1

Android SDK Platform-tools: 25.0.5

Android SDK Build-tools: 25.0.3


Moreover, my android-sdk folder contains those folders:


add-ons

build-tools

platform-tools

platforms

sources

system-images

temp

tools


And the “platforms” folder contains a folder “android-15”


I can successfully set the “Location of Android development SDK root” in
the LC Prefs, and also to create an android standalone.


Hope this helps,

Panos



On Fri, May 12, 2017 at 7:00 PM, panagiotis merakos <[hidden email]>
wrote:

> Hmm your /MacintoshHD/android-sdk/ directory should also include a folder
> "build-tools". Since it is not present, you can install it using the SDK
> Manager:
>
> Launch tools/android
> Find an item "Android SDK Build-tools" (should be at the top)
> Tick the checkbox and select "Install packages"
>
> After that the problem should be fixed :)
>
> Best,
> Panos
> --
>
> On Fri, May 12, 2017 at 6:34 PM, panagiotis merakos <[hidden email]>
> wrote:
>
>> Hi Dan,
>>
>> Your setup sounds perfectly fine to me. Could you please check if there
>> is a file /tools/lib/sdklib.jar?
>>
>> In the meanwhile I will check the version of the Android SDK Tools I have
>> installed in my Mac which works OK with LC.
>>
>> Best,
>> Panos
>> --
>>
>> On Fri, May 12, 2017 at 6:06 PM, Dan Friedman via use-livecode <
>> [hidden email]> wrote:
>>
>>> Panos,
>>>
>>> Thanks again for the help, but I think I must be stupid.  I selected
>>> “Desktop” and still got “invalid Android SDK”.   So, I deleted everything,
>>> redownloaded “tools_r24.4.1-macosx.zip” and put it in it’s own folder at:
>>> /MacintoshHD/android-sdk/.  I then unzipped it and launched
>>> /MacintoshHD/android-sdk/tools/android.   I selected “Android 4.0.3
>>> (API 15)” and clicked “Install Packages”.   When the install was complete,
>>> I went back to LC 8.1.3 and in Preferences I selected
>>> /MacintoshHD/android-sdk/ as the “Location of Android development SDK
>>> root”.  Once again, “invalid Android SDK”.
>>>
>>> The /MacintoshHD/android-sdk/ directory contains these items:
>>> add-ons
>>> platform-tools
>>> platforms
>>> sources
>>> system-images
>>> temp
>>> tools
>>> tools_r24.4.1-macosx.zip
>>>
>>>
>>> Any other thoughts or advise?  Maybe I’m destined to only make iPhone
>>> apps?
>>>
>>> -Dan
>>> _______________________________________________
>>> use-livecode mailing list
>>> [hidden email]
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>
>>
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Android Setup Config

Bob Sneidar via use-livecode
In reply to this post by Bob Sneidar via use-livecode
Great :)

You are welcome :)

On 12 May 2017 19:45, "Dan Friedman via use-livecode" <
[hidden email]> wrote:

> Panos,
>
> WooHoo!!  Adding the Android Build-tools 25.0.3 did the trick!!   Not only
> did LiveCode accept the “android-skk” folder as the “Location of Android
> development SDK”, but it also successfully built the Android app.
>
> Panos, thank you.  Really!  Thank you for your time and your detailed
> instructions.  You made my day!!
>
> -Dan
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Android Setup Config

beugelaar
This post has NOT been accepted by the mailing list yet.
In reply to this post by Bob Sneidar via use-livecode
Hi Thierry,

I had the same problem when configuring LiveCode on a new Mac (El Capitan).

For me worked this:

1. Install latest Android Studio (AS). This will installl the Android SDK in /Users/<user>/Library/Android/sdk

2. Startup Android Studio. Choose 'Configure' in Welcome to Android Studio screen. Select SDK Manager and disable 'Automatically check updates for' in section 'Updates' after you have installed your desired SDK Platforms. Quit AS.

3. Rename /Users/<user>/Library/Android/sdk/tools to /Users/<user>/Library/Android/sdk/tools-studio

4. Unzip tools_r24.4.1-macosx.zip in a temp folder and copy the unzipped 'tools' folder to /Users/<user>/Library/Android/sdk/

5. Now you are done for LiveCode. If you still want to be able to use Android Studio. Startup AS. AS will tell you that there is no Android SDK installed. Choose to ignore the use of the wizard and AS will continue.

I hope RunRev will ring this install procedure soon up to date.

Cheers,
Erik
Erik Beugelaar
 
www.solidit.nl