apk preparation failed

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
RobertC
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 46
Joined: Sun Feb 04, 2007 3:43 pm

apk preparation failed

Post by RobertC » Mon Aug 13, 2012 10:01 am

Hello, I'm a newbie with android development. I just got a Samsung Galaxy GT-N7000, running Android 4.0.3.
After following the instructions to get the platforms etc. onto my Mac, I got the emulator running and the connections set up between LC 5.5.1 and the Android stuff. However, I keep getting:

"Unable to build app for testing: apk preparation failed"

and have no clue why. The state of the sdk manager is :
apk.jpeg
sdk manager status
Any hint welcome...
The Old Rant Robert.

RobertC
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 46
Joined: Sun Feb 04, 2007 3:43 pm

Re: apk preparation failed

Post by RobertC » Thu Aug 16, 2012 9:53 pm

OK, problem solved: needed an update to several packages and also a deletion of the .android folder in the home folder so that it would be recreated on restart. (found that solution from Jacque LG in another thread, thanks J!)

So I'm on the road now.
The Old Rant Robert.

Jason1234
Posts: 42
Joined: Sat Jun 18, 2011 9:20 am

Re: apk preparation failed

Post by Jason1234 » Fri Aug 24, 2012 12:25 pm

I am now having the same problem.

Computer: Windows Vista
Livecode Version: 5.5.1 Commercial
Android SDK 2.2 API 8

Emulator is found and runs plus Livecode can see it so all the settings must be good.

The application builds and runs fine but will not build for testing. I have the emulator correct as per the instructions in the Android release notes plus it is selected in Livecode as the test target.

Everything start to build and then the dreaded
Unable to build for testing: apk preperation failed

I have removed and re-installed the SDK and updated it. I have tried a basic form with no code and still no build success.

Can anyone help as this used to work on the 4.6.3 version of Livecode.
Windows / MAC / IOS / Android - Deployment
Build 5.5.4 / & Community Version 6.1

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

Re: apk preparation failed

Post by jacque » Fri Aug 24, 2012 11:20 pm

Did you delete the .android folder in the home folder? That's what fixed it for me.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Jason1234
Posts: 42
Joined: Sat Jun 18, 2011 9:20 am

Re: apk preparation failed

Post by Jason1234 » Sat Aug 25, 2012 12:35 am

Thank you for responding.

I have the SDK Installed at ProgramFiles location. There was an Android folder in the root C directory that was empty so I removed it. Plus I looked for the .Android folder in the installed location (I presume that it what you meant by home directory) and could not find one.

Have tried everything else I could find on the Forum and still no luck. I actually think this is a problem seen far too many times and I would have thought that the people at Runrev would have done something to address this issue somehow as it is quite important to be able to run your application on Emulator as it is the only way to test on multiple screen resolutions.

I actually can't build to test on an actual device either, I have to build it as apk and then install to the actual device. This is time consuming.

Anyway thank you for your help... if you can think of anything else I could try that would be great.

Regards
Windows / MAC / IOS / Android - Deployment
Build 5.5.4 / & Community Version 6.1

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

Re: apk preparation failed

Post by jacque » Sat Aug 25, 2012 12:45 am

I had to look it up again, and actually all you need to remove is the debug.keystore file which is in that folder. Here's what I found:
Navigate to the .android folder in your home directory “~/.android” (Linux,Mac OS) or c:\Documents and Settings[User Name].android in windows XP or C:\Users.android in windows Vista or Windows 7, and delete debug.keystore file.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Jason1234
Posts: 42
Joined: Sat Jun 18, 2011 9:20 am

Re: apk preparation failed

Post by Jason1234 » Sat Aug 25, 2012 1:29 am

Thank you so very much...!

Now working.

Yet again you are the one that comes to help. The Forum would be stuffed without you.

Regards & Thanks
Windows / MAC / IOS / Android - Deployment
Build 5.5.4 / & Community Version 6.1

JosephBernard
Posts: 2
Joined: Thu Jan 24, 2013 4:39 am

Re: apk preparation failed

Post by JosephBernard » Thu Jan 24, 2013 10:00 am

LiveCodeError.PNG
Help please,

I have followed procedures identified in this post to try address the above error but with no success. Can anyone offer any further steps which will help resolve this issue.. FYI.. I have created a single page app with a hello world script so as to minimize any posssible issues relating to code

Specifically, i have:

1/ deleted the file "debug.keystore" and restarted apps,
2/ deleted complete directory and reset up AVDs
LiveCodeDir.PNG
LiveCodeDir.PNG (2.27 KiB) Viewed 7934 times
3/ reinstalled the andriod SDK with following options
AndroidSettings.PNG

Post Reply

Return to “Android Deployment”