Unable to "save as standalone app"

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dkloh
Posts: 6
Joined: Sun Dec 14, 2014 12:59 pm

Unable to "save as standalone app"

Post by dkloh » Sat Mar 07, 2015 5:03 am

I've been grappling with this for a while and am really lost. I can't seem to get Livecode to compile a standalone Android app. Works okay on a simulator. But when I tried to save as a standalone application, I get the following error message: "There was an error while saving the standalone application. apk finalization failed."

Not sure what I did wrong here. I have Livecode Community 7.0.1 for now (still evaluating Livecode) and the latest Android SDK tools installed.

I recorded a short video of the error message here (if it helps to understand the issue I'm facing better):
http [colon][double forward slash] youtu [dot] be [forward slash] ECyiDXfruL4

Any help to point me in the correct direction is greatly appreciated! Thanks in advanced!! :?

(PS sorry for the cryptic link. My account does not have permission to post links or domain/page references.)

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

Re: Unable to "save as standalone app"

Post by Simon » Sat Mar 07, 2015 5:50 am

Hi dkloh,
Welcome to the forum!

I would start by removing everything in the standalone settings for Android.
Just start a new stack with your "hello world" and click on build for Android. See if it builds correctly then.
We can then add one by one the things in the settings page.

Just a note, I've never seen this error before.

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

dkloh
Posts: 6
Joined: Sun Dec 14, 2014 12:59 pm

Re: Unable to "save as standalone app"

Post by dkloh » Sat Mar 07, 2015 6:46 am

Screen Shot 2015-03-07 at 1.42.23 pm.png
I'm not sure if I'm getting this right. Tried removing "everything" in the settings, and still no joy... :cry:

Sorry, I'm a real newbie here. Do you have a "next step" suggestion I could try?

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

Re: Unable to "save as standalone app"

Post by Simon » Sat Mar 07, 2015 7:15 am

The only thing that is left is the Signing.Try the other 2.

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

dkloh
Posts: 6
Joined: Sun Dec 14, 2014 12:59 pm

Re: Unable to "save as standalone app"

Post by dkloh » Sat Mar 07, 2015 7:26 am

Hey Simon,

Thanks for your patience...

1) Do no sign - no joy
2) Sign for development only - same error
3) Sign with my key - I don't have a key (what's a key anyway?). Left the key field blank. Same error message.

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

Re: Unable to "save as standalone app"

Post by Simon » Sat Mar 07, 2015 8:02 am

Hi dkloh,
3) http://lessons.runrev.com/m/4069/l/3267 ... ndroid-app

I'm sorry, this is a new report to me, I've never seen that error. But do try starting with a new stack.

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

dkloh
Posts: 6
Joined: Sun Dec 14, 2014 12:59 pm

Re: Unable to "save as standalone app"

Post by dkloh » Sat Mar 07, 2015 4:22 pm

Hey Simon!
Thanks for your replies so far!

I guess I managed to hit a "new" stage with signing own key. I used the following command line to generate a new keystore:

Code: Select all

keytool -genkey -v -keystore test.keystore -alias testApp -keyalg RSA -keysize 2048 -validity 10000
I set the password to be "password" for both the keystore and the testApp alias.

I now get the following error message when compiling:

"There was an error while saving the standalone application. signing failed - keystore loaded. Keystore was tampered with, or password was incorrect."

Any hints to the next step I should take?

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Unable to "save as standalone app"

Post by jacque » Sat Mar 07, 2015 9:37 pm

The key was either not created correctly or you mistyped the credentials. But signing the app shouldn't be necessary for testing, I always use "sign for development" and it works fine.

The problem is more likely that you don't have all the SDK packages you need to create an apk. Make sure you've downloaded everything for the Android versions you will support. You don't need the sample files or the documentation files, but grab everything else. And make sure you have the current tools files.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

dkloh
Posts: 6
Joined: Sun Dec 14, 2014 12:59 pm

Re: Unable to "save as standalone app"

Post by dkloh » Sun Mar 08, 2015 8:27 am

I would have imagined that it doesn't have to be my own key too... But anyway, this is what I have installed for the Android SDK:
Screen Shot 2015-03-08 at 3.25.21 pm.jpg
Happen to spot anything I might have missed?

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Unable to "save as standalone app"

Post by jacque » Sun Mar 08, 2015 8:23 pm

I'm never sure exactly what the engine needs from the SDK, but I've got build tools installed for every version of Android I use. I can't see whether you've installed other versions less than 5.0.1 but if you do, I'd install those build tools too. Also, since the LC engine requires Android 2.2, install build tools for 2.2.

You'll probably want to support at least Android 4.x since only about 5% of all users have Lollipop (Android 5.0) so far. Building for 3.x is even better, most users are on that version.

Another guess is if you are using any in-app purchasing you might need the extras for those. That's just a guess though. Also there was a problem with Google Play services on some devices, so maybe you need all those too (but again, I don't really know.) It wouldn't hurt anything to have them installed probably. I was able to build an app without the extras, but it didn't use any of those services.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

dkloh
Posts: 6
Joined: Sun Dec 14, 2014 12:59 pm

Re: Unable to "save as standalone app"

Post by dkloh » Mon Mar 09, 2015 11:19 am

I had 2.2, 3.0, 4.0 and 5.0.1 installed...

Anyway, I just realised I had Livecode Community 7.0.1 installed. Didn't realise that 7.0.3 was available - tried to click "check for updates" and 7.0.1 told me that it was the latest version.

Downloaded and installed 7.0.3, and now it seems to be working!

Thank you all!!

Post Reply