Android deployment not working with LC 6.5

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
William Jamieson
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 212
Joined: Fri Feb 01, 2013 1:31 am
Contact:

Android deployment not working with LC 6.5

Post by William Jamieson » Tue Dec 24, 2013 7:36 pm

Hello Livecode world and merry Xmas!

Unfortunately I must have been to naughty this year :P because I got a lump of coal in my Livecode.

So I am using the new Livecode 6.5 on one computer, and 6.5.1 on another windows computer. And I have not been able to deploy any apps onto any android device. I even tried a hello world stack and exited the datagrid helper and MobGUI. With the datagrid helper and mobGUI when I press "deploy", Livecode just force closes. Without those running, the Livecode deployment process will go to "Installing the application", then freezes indefinitely. I have tried a variety of Android devices on a variety of windows computers to deploy from and nothing seems to work. However, it does work for an apple computer. Maybe it's a classic "windows" user experience?

Also, I tried reinstalling the JDK and the ADK. I made sure that these were up to date and included all the API levels, and made sure that they were pointed correctly in the mobile preferences in Livecode.

I don't know what else I can try. I am out of ideas. I tried contacting Runrev and they just told me to follow the instructions in their "Become an android developer" pdf which I have read many times and set up many times on many computers and never had a problem before.

So I am just curious as to whether anyone else has had a similar problem or if anyone else has any ideas to fix this.

-Will

William Jamieson
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 212
Joined: Fri Feb 01, 2013 1:31 am
Contact:

Re: Android deployment not working with LC 6.5

Post by William Jamieson » Tue Dec 24, 2013 7:40 pm

Oh yeah, I tried saving as a standalone application, transferred it to my android mobile device, then installed it, but the installation APK just force closes when I click to install. (All Privacy and security settings are appropriately set.)

So that did not work either.

qberty1337
Posts: 35
Joined: Sun Sep 09, 2012 1:09 pm

Re: Android deployment not working with LC 6.5

Post by qberty1337 » Fri Dec 27, 2013 4:19 pm

I sometimes run into this on a fresh machine. It's usually various issues but try downgrading your JDK/JRE from 7 to 6 Update 45. 6 Seems to be able to sign the apks correctly on windows as 7 just doesn't work at all for some reason.

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

Re: Android deployment not working with LC 6.5

Post by LCNeil » Mon Jan 06, 2014 2:46 pm

Dear William,

Could you let me know the following information and we will try to replicate the issue here-

- OS version (e.g. Win 7 SP2 64 Bit)
- JDK version with version number
- Android SDK revision number
- Sample stack (to rule out possible stack issues)
- Sample APK to test on our devices

Once I have the above, I should be able to advise further.

Kind Regards

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


MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: Android deployment not working with LC 6.5

Post by MaxV » Tue Jan 07, 2014 5:34 pm

Change standalone setting sign in: Sign for development only

At the present I can install app only this way. :(
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

William Jamieson
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 212
Joined: Fri Feb 01, 2013 1:31 am
Contact:

Re: Android deployment not working with LC 6.5

Post by William Jamieson » Fri Jan 17, 2014 10:50 pm

Sorry for the late response I havent been on the forums lately.

Here is the information

OS: Windows 8 64 bit
JDK Version: 1.7.0_17
Android SDK Revision Number: 2.2 Froyo - 4.3
(All are installed and I usually have it set to a minimum version number of 2.2)

Cannot attach stack because of 256 kb limit but will email it to you.

Why is there a 256Kb limit? APKs are usually 2-25Mb

Thank you for your help Neil!

-Will

paul_gr
Posts: 319
Joined: Fri Dec 08, 2006 7:38 pm

Re: Android deployment not working with LC 6.5

Post by paul_gr » Sat Jan 18, 2014 8:46 pm

Have you tried what qberty1337 suggested, uninstalling JDK 1.7 and replacing it with JDK 1.6?

Paul

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

Re: Android deployment not working with LC 6.5

Post by LCNeil » Mon Jan 20, 2014 1:05 pm

Hi Will,

Thank you for supplying your files via support.

I could not install the APK you supplied as I believe it was saved with the option of "Sign With My Key" and no key was supplied. When testing Android APKs the option "Sign For Development Only" should be selected and this will allow you to install test APKs on your device. I have made this change to your stack and included it in the attached zip.

I also notice you are using out of date syntax for your fullscreenmode property. As of the final version on LiveCode 6.5 there should be no space in "letter box" (letterBox). I have applied this change to your stack as well.

After I made these changes, I was able to successfully test your application with no errors or crashes (although I didnt experience any crashes when trying to build your application prior to these changes)

As you have been using "letter box" it would imply that you are using a RC or DP version of 6.5 (these can be unstable). Please update to the latest version of LiveCoed 6.5.1 and try deploying again.

I hope this gives you some leads.

Kind Regards,

Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
Attachments
Archive.zip
(1.8 MiB) Downloaded 287 times

William Jamieson
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 212
Joined: Fri Feb 01, 2013 1:31 am
Contact:

Re: Android deployment not working with LC 6.5

Post by William Jamieson » Sat Feb 01, 2014 8:20 am

Ok. So I took the suggestions of everyone here and tried it again. It turns out that I had been using Livecode 6.5.0 (The one after RC7) instead of 6.5.1. Once I made the switch it started working.

LC still doesn't register my Tablet when I plug it in, but I think it is more of a driver issue. The workaround is to email myself the APK.

So thank you everyone for your help as I had a lot riding on being able to make this work. I really appreciate your help. So thank you again Neil. You guys Rock!!

(I think I am going to stick with stable versions from now on btw)

-Will

SusanB
Posts: 111
Joined: Mon Nov 07, 2011 4:10 am
Contact:

Re: Android deployment not working with LC 6.5

Post by SusanB » Mon Feb 03, 2014 11:17 pm

I just had to post when I saw that you were emailing yourself the APK in order to deploy on your tablet. I'm having to do that, too, and it's getting really, really old. Once upon a time I was able to use both the emulator and deploy to my galaxy and run one test after another, but for some reason, I now always get "Unknown deployment platform" when I try to test. I've done everything I did in the past (I think) to get it to work, but to no avail. Livecode 6.5.2 Mac OS 10.8.2 redownloaded and installed Android sdk (it's pointing to the right folder). Any help would be deeply appreciated.

MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: Android deployment not working with LC 6.5

Post by MaxV » Tue Feb 04, 2014 12:46 pm

SOLVED!

JDk 1.7 messes signing process, so you have to declare the old (JDK1.6) signing method.
So use don't sign option, and sign yourself with:

Code: Select all

jarsigner.exe -sigalg MD5withRSA -digestalg SHA1 -verbose -keystore myKey.keystore myApp.apk myalias
Jarsigner is in JDK/bin/ folder.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

William Jamieson
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 212
Joined: Fri Feb 01, 2013 1:31 am
Contact:

Re: Android deployment not working with LC 6.5

Post by William Jamieson » Sat Feb 08, 2014 7:51 am

SOLVED

Thank you monte for your suggestion. I am unrestrained by my knowledge of the datagrid at the moment, but its always good to look through the basics in case i missed something. What I had never used before was droptools. So, using droptools, it worked perfectly and that was the main problem. Just curious since I have almost all of your products, do all of them require droptools? I dont recall seeing which ones do and which ones don't.

And I love using the Datagrid helper. The only problem with using the script install is that I am building for Android as well as iOS. An android script install would be greatly appreciated :D

I will post the step by step solution below in case anyone else has an issue with droptools and installing the DG

1. install droptools by putting the "droptools.livecode" file into the “plugins” folder in the Livecode executable folderpath.
2. Create a folder in the “plugins” folder called “droptools”
3. Put the file called “mergDatagridScroller.livecode” into the “droptools” folder
4. Turn on Livecode
5. Create a new stack
6. Under “development” from the menu bar, under plugins, click “stsDropTools”
7. The window should open and you should make sure you are in edit mode (not run mode)
8. Drag the datagrid looking image in the droptools stack over to the new stack
9. Put a lot of information in the DG so that it needs to scroll
10. Size the datagrid to fit most the screen
11. Hit this line of code after the datagrid is sized: send "updateContentRect" to group "MergDataGridScroller 1" of this card

And that should work.

Cheers,

-Will

Post Reply