Common Android Deployment issues

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

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

heatherlaine
Site Admin
Site Admin
Posts: 305
Joined: Thu Feb 23, 2006 7:59 pm

Common Android Deployment issues

Post by heatherlaine » Mon Oct 26, 2015 12:17 pm

Dear folks,

When building for Android there are various steps you need to take, and a number of known issues which come up frequently. Before seeking assistance, it is helpful to check these lessons:

http://lessons.runrev.com/m/2571/c/11956

Read this blog post:

https://livecode.com/how-to-deploy-apps ... d-devices/

and view this video:

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

If you are still stuck - post away! We're all here to help :)

Regards,

Heather
Customer Services Manager
LiveCode Ltd.

felixyonathan
Posts: 1
Joined: Fri Jan 06, 2017 10:03 am

Re: Common Android Deployment issues

Post by felixyonathan » Fri Jan 06, 2017 10:15 am

Hi guys. I've been using LiveCode for several days. I deployed my app successfully for testing on Android. However, after asking to install, the app doesn't appear to be installed. It passed through the screen and nothing happened.

Thank you for your help.
Attachments
Screenshot_2017-01-06-16-12-36-223_com.google.android.packageinstaller.png

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

Re: Common Android Deployment issues

Post by jacque » Fri Jan 06, 2017 6:07 pm

If the app was previously installed and you haven't changed the build number of the new version, you will get the behavior you describe. It will appear to install but the old copy remains. There are two ways to avoid this.

1. Uninstall the old copy before installing the new one.
2. Change the build number in the Android pane of standalone settings before compiling the standalone.

If you have the phone attached by cable to the computer and are using the Test button in LC's toolbar, you don't need to worry about it, LC manages the uninstall /reinstall for you.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

simon.schvartzman
Posts: 135
Joined: Tue Jul 29, 2014 12:52 am

Re: Common Android Deployment issues

Post by simon.schvartzman » Wed Feb 01, 2017 10:03 pm

I'm experiencing the following problems to get the setup working and will appreciate the usual help from the community

1- the link referenced @ How do I Become an Android Developer on a Mac? to download the Android SDK

http://developer.android.com/sdk/index.html

gets redirected to Download Android Studio instead

https://developer.android.com/studio/index.html

2 - I downloaded it, installed all the SDKs as instructed
sdk.jpeg
but I can't find/setup the location on LC Preferences
sdk2.jpeg
3 - I've also downloaded the JAVA SDK but I don't see how to define its location on LC Preferences
sdk3.jpeg
Simon

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

Re: Common Android Deployment issues

Post by jacque » Wed Feb 01, 2017 10:28 pm

You don't need Studio, I'd delete it. Go back to the Android SDK download page and scroll all the way to the bottom where you can "Get just the command line tools". Install for your OS (which looks like Mac from the screenshots.) Put the folder in an accessible location. Many people use Documents. I have created a Developer folder expressly for it.

Double-click on the android file ("android-sdk-macosx/tools/android") to launch the command line tools in Terminal, which will open the SDK manager. Check that the correct files are installed.

Re-launch LC. In LC preferences, point the SDK root path to the "android-sdk-macosx" folder (or the equivalent if you aren't on Mac.) LC should find the JDK Path entry by itself. Mine says "JDK Path: /Library/Java/JavaVirtualMachines/1.6.0.jdk". It used to be that you needed the 1.6.0 java engine for Mac, which I'm still using, but I'm not sure if LC has changed to allow a newer version.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

AxWald
Posts: 287
Joined: Thu Mar 06, 2014 2:57 pm

Re: Common Android Deployment issues

Post by AxWald » Thu Feb 02, 2017 10:21 am

Hi,

as Jacque said, you don't need the full Studio, the SDK manager is all that's required. But if you have the studio already, it works, too!

What you need to enter in the LC preferences/ Mobile support is the correct path to the installed SDK, and this can be tricky and confusing. Android creates a bunch of folders all over the system, and many of them hidden ...
For me on Win (with full Studio) it's: "C:\Users\myName\AppData\Local\Android\sdk". On another computer with only the raw SDK it's: "C:\Users\myName\AppData\Local\Android\android-sdk"

In any case it's the one that is shown in the header line of the SDK manager (Your first pict, the selected entry at "Android SDK Location:")

Select the correct SDK folder in the LC preferences, make sure it's the same as shown in the SDK manager, and you should be done. The JDK path should be there then, too. Automagically.

Hope this helped, have fun!
Livecode programming until the cat hits the fan ...

simon.schvartzman
Posts: 135
Joined: Tue Jul 29, 2014 12:52 am

Re: Common Android Deployment issues

Post by simon.schvartzman » Thu Feb 02, 2017 4:49 pm

@Jacke and @AxWald, many thanks to both of you for your inputs.

I tried Jacke's and worked (at least now I see LC properly pointing out to where the Android SDK).

Next goal to successfully compile my first Android App.

Regards
Simon

IanMcK
Posts: 13
Joined: Mon Jul 05, 2010 10:47 am

Re: Common Android Deployment issues

Post by IanMcK » Mon Apr 17, 2017 11:55 am

Hi

I too am having installation issues on Windows 10 with LC 8.1.3 Indy. I have installed and re-installed Android SDK a number of times, tried the SDK tools approach a number of times - all with the same result.

In the end I went for the Studio Option. I know its not really needed but all the modules (tools, platform etc) were there.
I installed the SDK in a folder in my Documents folder, ran LC and attempted to link to the SDK. However, I continually get this message whatever I do.

"The chosen folder is not a valid Android SDK. Please ensure you have installed it correctly, and enabled support for Android 4.0.3 (API15)"
The folder contents are shown in here
AndroidSDK Folder Contents.png
Now the folder location in LC is exactly as it appears in location box in the SDK window.
D:\IanM\Documents\AndroidSDK
Android 4.0.3 has been installed as has Java Version 8 Update 121.

Can anyone suggest what I am doing wrong?

Many thanks

AxWald
Posts: 287
Joined: Thu Mar 06, 2014 2:57 pm

Re: Common Android Deployment issues

Post by AxWald » Mon Apr 17, 2017 1:32 pm

Hi,

after updating to the most recent Studio my LC didn't recognize it anymore, too. I had to remove it & install something older (found a SDK manager Rev. 24.2.1, don't remember where) - this works as before.

LC seems to be quite picky with newer SDK's, I decided not to update it (the SDK) anymore.

Have fun!
Livecode programming until the cat hits the fan ...

IanMcK
Posts: 13
Joined: Mon Jul 05, 2010 10:47 am

Re: Common Android Deployment issues

Post by IanMcK » Wed Apr 26, 2017 3:17 pm

Just to provide an update. I downloaded the SDK package and installed it again using the terminal. Everything now works as it should. Brilliant.
Thanks for the help.

sphere
Posts: 469
Joined: Sat Sep 27, 2014 10:32 am
Location: the Netherlands

Re: Common Android Deployment issues

Post by sphere » Sat Sep 02, 2017 11:45 am

For using the Command Line either MAC or Win we could use a lesson. As following the options on Googles pages, not all commands are mentioned.
Seeing some StckOverflow pages there are more commands available like getting system-images for the emulator. I could not find the command for it on the google dev page.
The emulator can be started from the command line.

Also when a clear lesson is there for the command line tool, this saves us unneccessary space filled by Android Studio.

The command line also gives erros when you do not have the command correctly written, as there are many examples on the web which all do result in one or the other syntax fault, more insight depth can be used.
I would gladly create a howto but i'm getting several errors which i did not figure out yet trying different examples.
Downloading tools and system-images suceeded. Creating the AVD which is needed for the emulator not yet.

SPhere

***EDIT*** as a matter of fact, working on this right now, when ready i'll create a new topic
Global Market Share WorldWide Android 84.82%
Global Market Share WorldWide iOs 12%

Just a wild guess that we need more support and features for Android than iOs...

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

Re: Common Android Deployment issues

Post by jacque » Sat Sep 02, 2017 6:06 pm

You don't actually need to use the command line tools, they just have to be installed. The engine uses them.

All you need to do is unzip the download, find the file named "android" and double click it. A GUI interface opens where you can download the packages you need.

Instructions for creating device images are in the lesson "How do I become an Android developer on <OS >".
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

sphere
Posts: 469
Joined: Sat Sep 27, 2014 10:32 am
Location: the Netherlands

Re: Common Android Deployment issues

Post by sphere » Sat Sep 02, 2017 7:01 pm

as far as i know not anymore: android.bat is deprecated
also in that lesson http://lessons.livecode.com/m/4069/l/56 ... er-on-a-pc
is this:
The most recent version of the Android SDK tools do not work with LiveCode. If you are using LiveCode 8.1.5 or later please install Android Studio as described in this lesson.
refers to: http://lessons.livecode.com/m/2571/l/62 ... oid-studio
Global Market Share WorldWide Android 84.82%
Global Market Share WorldWide iOs 12%

Just a wild guess that we need more support and features for Android than iOs...

WilliamGilliam
Posts: 2
Joined: Thu Oct 26, 2017 6:47 pm

Re: Common Android Deployment issues

Post by WilliamGilliam » Thu Oct 26, 2017 7:03 pm

Aloha

I have been using live code for a few years and deployed many standalone successfully. I just re-purchased an indy license for the specific purpose of creating an android application. I am unable to compile any standalone for Android no matter what I try and get the common error "There was an error while saving the standalone application could not compile application class".
I have installed the latest Java SDK, Android Studio and LiveCode. I have all the SDK tools and packages installed, I have successfully pointed Livecode to my SDK, I have created a signature and tried building with and without it, and for development. I have scoured these forums, StackExchange and the internet at large for new things to try. I truly believe I have found all the cases of this error online and tried the solutions to no avail. Im on OS X 10.12.6, LiveCode 8.1.7, Android Studio 2.3.3. I have tried several different applications including the basic "Hello World" button. I can compile in all other formats.
Please help! Ive spent three days solid trying every combination of settings I can and to no avail.
Mahalo for any advice.

WilliamGilliam
Posts: 2
Joined: Thu Oct 26, 2017 6:47 pm

Re: Common Android Deployment issues

Post by WilliamGilliam » Thu Oct 26, 2017 7:18 pm

Of course I figure it out right after I post :roll:
Downgraded my Java version from 9.0 and works like a charm.

Post Reply

Return to “Android Deployment”