Page 1 of 1

Definitive Android Setup?

Posted: Thu Jun 16, 2016 8:32 am
by arc
Hi folks. This is a simple question with possibly not a simple answer.

Is there a definitive configuration guide anywhere for setting up Livecode to build Android apk's? I'm having a nightmare as sometimes code builds for Android and sometimes it doesn't. Yesterday I wrote a simple Hello World and it compiled for Android every time. Today I booted my PC and the very same Livecode program won't compile. I get a rather ominous "There was an error while saving the standalone application could not compile application class". Other than rebooting my PC nothings changed. It's really weird.

My setup is:
New PC running Windows 10 Pro 64bit,
500GB SSD,
12GB RAM
Livecode 8.0.1 Community
Android Studio 2.1.2
SDK Platforms
* Android 6.x(N)
- - Android SDK Platform 24
- - Android TV Intel x86 Atom System Image
- - Intel x86 Atom System Image
- - Intel x76 Atom_64 System Image
* Android 6.0 (Marshmallow)
- - Android SDK Platform 23, rec 3
- - Android TV ARM EABI v7a System Image
- - Android Wear ARM EABI v7a System Image
- - Android Wear Intel x86 Aton System Image
- - ARM EABI v7a System Image
- - Intel x86 Aton System Image
- - Intel x86 Aton_64 System Image
- - Google APIs Intel x86 Atom System Image
* Android 4.1 (Jelly Bean)
- - Android SDK Platform 16
- - Sources for Android SDK
* Android 4.0.3 (IceCreamSandwich)
- - Android SDK Platform 15
- - Sources for Android SDK
- - ARM EABI v7a System Image
* Android 2.3 (Gingerbread)
- - Android SDK Platform 9
* Android 2.2 (Froyo)
- - Android SDK Platform 8

Android Studio had a bunch of SDK bits pre-selected so I left them in. I have no idea whether I need them to get Livecode to build for Android or not so I'm quite happy to add or remove any SDK components as required.

If anyone can share their experiences or findings it would be great to get a definitive setup for each platform published either here or on the Livecode website for the current versions of Livecode, Android Studio and Windows.

Re: Definitive Android Setup?

Posted: Tue Jun 28, 2016 4:04 pm
by arc
Ok, 96 views but no replies. Either I'm one in a million or no-one knows how to get this to work?

Just so you don't think I'm just being a dufus, I've been through the steps I can find for configuring Windows for Livecode & Android development but they don't quite work for me. Yep, I've googled so many different variations on LiveCode & Android I've worn the letters of my keyboard.

I've uninstalled Android Studio and LiveCode several times and tried various combinations but I can't get past that blasted error message.

If I'd been running it on some old dodgy PC that had been through Vista > 7 > 8 > 8.1 > 10 and had all sort of junk installed on it I wouldn't be surprised if I got a problem, but this is a new "out of the box" installation with just Windows 10, Office 2013, LiveCode 8.0.1 and Android studio.

I'm baffled.

:?

Re: Definitive Android Setup?

Posted: Tue Jun 28, 2016 4:47 pm
by FourthWorld
I've had other error messages when I was getting started with my Android setup (Google's dev tools aren't nearly as well designed as their consumer experience), but not that one. Perhaps the reason you've had no replies here is that no one else has a ready answer.

If you're using the Indy or Business editions you qualify for support from the team, and I would suggest writing to them at support AT livecode.com.

If you're using the Community Edition then it's up to us in the community to provide support. I don't (yet) have a Win 10 installation to test on, but perhaps one of the other folks here can lend some insight. Also, it may be worth testing LC v8.1 DP if only to see if perhaps this Win10 issue has been addressed in recent builds.

Re: Definitive Android Setup?

Posted: Tue Jun 28, 2016 9:02 pm
by paul_gr
In preferences >> Mobile Support does LC show you the JDK path at the bottom of the window after it has the Android SDK path??
Path.png
I find the usual reason for the message "Could not compile application class" is that LC cannot find the JDK.

Before this post I built Android APK's successfully on Windows 10 Pro using Livecode 7.1.4 Community and Livecode 8.1 Community.

Paul

Re: Definitive Android Setup?

Posted: Thu Jun 30, 2016 8:38 am
by arc
Thanks guys for your replies.

Here's my installation config.
lc-android-sdk.png
LiveCode SDK settings
lc-android-sdk-403.png
Android 4.0.3
lc-android-sdk-233.png
Android 2.3.3

Re: Definitive Android Setup?

Posted: Thu Jun 30, 2016 8:42 am
by arc
and here's the LC settings
lc-android-sas.png
LiveCode Standalone Settings
My app is just a single form with a button that has

on mouseUp
answer "Hello world!"
end mouseUp

nothing complex.

However, when I try to save a standalone application for Android I get the onminous
lc-android-err.png
Error
lc-android-err.png (4.9 KiB) Viewed 10696 times

Re: Definitive Android Setup?

Posted: Thu Jun 30, 2016 10:48 am
by paul_gr
Hi Arc,
You got any SDK build tools installed; can you see them in the Android SDK Manager?
Build Tools.png
Otherwise your setup looks fairly close to the one I am using...

Paul

Re: Definitive Android Setup?

Posted: Thu Jun 30, 2016 3:56 pm
by arc
Hi Paul,

I've got these (seem to have been pre-selected)
lc-android-tools.png
SDK Tools

Re: Definitive Android Setup?

Posted: Fri Jul 01, 2016 12:40 am
by paul_gr
Just installed the same version LC as you, Community 8.0.1 and that works ok here as well.

I'm afraid I am as mystified as you are....

The only other thing I can think of is the path to your Android SDK contains a period in your username, and maybe that might be the problem.
A username containing a period can be a problem in some Linux distros, but not usually a problem for Windows users though...

Paul

Re: Definitive Android Setup?

Posted: Fri Jul 01, 2016 8:29 am
by arc
You're right - it does. I guess I could install Android Studio to a non-default location (something like C:\Apps\Android....). I'll try it and let you know if it makes any difference.

Re: Definitive Android Setup?

Posted: Fri Jul 08, 2016 11:04 am
by MaxV