Page 1 of 1

apk preparation failed

Posted: Mon Aug 13, 2012 10:01 am
by RobertC
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...

Re: apk preparation failed

Posted: Thu Aug 16, 2012 9:53 pm
by RobertC
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.

Re: apk preparation failed

Posted: Fri Aug 24, 2012 12:25 pm
by Jason1234
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.

Re: apk preparation failed

Posted: Fri Aug 24, 2012 11:20 pm
by jacque
Did you delete the .android folder in the home folder? That's what fixed it for me.

Re: apk preparation failed

Posted: Sat Aug 25, 2012 12:35 am
by Jason1234
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

Re: apk preparation failed

Posted: Sat Aug 25, 2012 12:45 am
by jacque
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.

Re: apk preparation failed

Posted: Sat Aug 25, 2012 1:29 am
by Jason1234
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

Re: apk preparation failed

Posted: Thu Jan 24, 2013 10:00 am
by JosephBernard
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 10540 times
3/ reinstalled the andriod SDK with following options
AndroidSettings.PNG