Trouble building app for Android

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

WeeKiwi7
Posts: 1
Joined: Fri Nov 07, 2014 10:44 pm

Trouble building app for Android

Post by WeeKiwi7 » Fri Nov 07, 2014 10:59 pm

When trying to test my program on an Android emulator it seems to proceed with building the app but then gives an error message:
"Installation of app failed: Missing APK file"
I found a thread on here about this problem but it wasn't much help unfortunately :(
I also attempted to build the app and then copy the APK to my phone and install it but after going though the installation process it says: "app not installed".

Any help would be greatly appreciated :)

wojtekdz
Posts: 1
Joined: Fri Nov 14, 2014 2:08 am

Re: Trouble building app for Android

Post by wojtekdz » Fri Nov 14, 2014 2:32 am

I had the same problem and fixed it by choosing "Sign for development only" for Signing in File > Standalone Application Settings > Android. Try that, maybe your Android is rejecting unsigned APKs?

toontan
Posts: 1
Joined: Wed Nov 19, 2014 9:04 am

Re: Trouble building app for Android

Post by toontan » Wed Nov 19, 2014 9:29 am

Hi all,

Please help, i ve been working on this for past few days, nothing seems to be solving the issue of the missing APK file. I am looking to run the test on the emulator and not an external device. I ve been through all the other forum replies for "Installation of app failed: Missing APK file"

Actions done:
-Installed older version of SDK, current one is as advised in link android-sdk-r22-windows
-SDK manager, installed SDK build-tools less than rev.20, installed Android 4.1.2, Android 2.2
-Standalone settings, saved project and under Android, for signing : selected "Sign for development only"
-Edit-preferences, selected Location of Android development SDK root
-AVD manager, selected lowest one 2.7" for device and Android 2.3.3 for target
-uncheck Snapshot, and emulator can launch.

However when i create the button and Development, test target, it says "Installation of app failed: Missing APK file"

Gage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 224
Joined: Tue Mar 26, 2013 8:59 pm

Re: Trouble building app for Android

Post by Gage » Sat Nov 22, 2014 3:31 am

Hi, I wanted to bump this up because I am having this issue right now also.

I was dealing with the "Could not compile application class" message, so I reinstalled Eclipse and all of the SDK, pointed to it from LiveCode, etc.

It did make my original message go away, but now I'm in this boat!

I am trying to deploy to my external test device, but am getting the same message. Going to try different versions of LiveCode that are out there, but hoping someone can rescue me also!

*Currently using LiveCode Commercial v6.7*

Thanks,
Phil E.

Gage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 224
Joined: Tue Mar 26, 2013 8:59 pm

Re: Trouble building app for Android

Post by Gage » Sat Nov 22, 2014 3:46 am

Update:

on LiveCode Commercial v6.6.4, I am getting a different error message... "Unable to build app for testing: could not encode class bundle"

on LiveCode Commercial v6.6.3 and earlier, my SDK version is not accepted in the LiveCode Preferences window (probably due to new Android versions)

on LiveCode Commercial v7.0 (rc 2), my SDK version is accepted in the LC Preferences window, but I cannot test (menu options are disabled for some reason)

Not much help yet, but at least I know a bunch more stuff that doesn't work.

Phil E.

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

Re: Trouble building app for Android

Post by LCNeil » Sat Nov 22, 2014 4:04 pm

Hi All,

There were a few issues with the Android SDK in recent versions of LiveCode but these have since been resolved. Quite a lengthy post on these issue can be found here-

http://forums.livecode.com/viewtopic.php?f=7&t=13889

Please download and install the latest version of LiveCode (7.0 RC2) and try deployment again.

If the issue persists after installing this version, please post your stack to the forums as there could be something stack related causing the issue.

Kind Regards,

Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
--

newtronsols
Posts: 192
Joined: Tue Mar 11, 2014 12:57 pm

Re: Trouble building app for Android

Post by newtronsols » Sat Nov 22, 2014 4:14 pm

wojtekdz wrote:I had the same problem and fixed it by choosing "Sign for development only" for Signing in File > Standalone Application Settings > Android. Try that, maybe your Android is rejecting unsigned APKs?
A cheat way to create a signature to sign apk's: register with http://appinventor.mit.edu/explore/ and download the signature it lets you create with your personal details. Hopefully it still lets you do this... It's a shame LC doesn't let you create a signature easily. I did create a windows app to do this but lost it with everything else when my laptop crashed. So backup regularly.

Gage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 224
Joined: Tue Mar 26, 2013 8:59 pm

Re: Trouble building app for Android

Post by Gage » Sun Nov 23, 2014 1:09 am

runrevneil wrote:Hi All,

There were a few issues with the Android SDK in recent versions of LiveCode but these have since been resolved. Quite a lengthy post on these issue can be found here-

http://forums.livecode.com/viewtopic.php?f=7&t=13889

Please download and install the latest version of LiveCode (7.0 RC2) and try deployment again.

If the issue persists after installing this version, please post your stack to the forums as there could be something stack related causing the issue.

Kind Regards,

Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
--

Thanks Neil!

Unfortunately, I have already tried 7.0 rc2, and it doesn't give me the same error message, but instead gives me another: "Unable to build app for testing: could not encode class bundle"

My business partner is able to deploy it using LC 6.6.2, so I am hesitant to put the stack on the forums since it is our clients' property.

Any further advice on how to respond to this error message?

Hopefully this is helpful to others watching this thread, as well.

Regards,
Phil E.

bmalkows
Posts: 12
Joined: Fri Nov 28, 2014 6:47 am

Re: Trouble building app for Android

Post by bmalkows » Fri Nov 28, 2014 4:25 pm

apk error.JPG
I have the same issue as toontan with some differences (days as well):

Actions done:
-Installed older version of SDK, current one is as advised in link installer_r23.0.2-windows
-SDK manager, installed SDK build-tools just rev.20, installed Android 4.1.2, Android 2.2, Android 2.3
-Standalone settings, saved project and under Android, for signing : selected "Sign for development only"
-Edit-preferences, selected Location of Android development SDK root
-AVD manager, selected lowest one 3.7" WVGA for device and Android 2.3.3 for target
-uncheck Snapshot, and emulator can launch.

However when i create the button and Development, test target, it says "Installation of app failed: Missing APK file"

After this I uninstalled Live Code 7.0 and installed RC2 and setup applicable areas again. When I ran the simple Button app for newbies I now received "Unable to build app for testing: apk preparation failed"

Not sure where to go from here ...

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

Re: Trouble building app for Android

Post by LCNeil » Fri Nov 28, 2014 4:44 pm

Hi all,

For anyone who is having issues, I would highly recommend deleting your current Android SDK installation, and starting fresh as LiveCode 7.0.1 (RC2) should be compatible with the most recent versions of the Android SDK. I am able to confirm this as I am running version 23.0.5 of Android SDK tools and 21.1.1 of Android SDK build tools.

The following youtube video lesson will also assist with setting up the SDK within LiveCode, step by step-

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

Kind Regards, 

Neil Roger 
-- 
LiveCode Support Team ~ http://www.livecode.com 
--

bmalkows
Posts: 12
Joined: Fri Nov 28, 2014 6:47 am

Re: Trouble building app for Android

Post by bmalkows » Sat Nov 29, 2014 2:23 am

Hi Neil,

Followed your latest instructions and step by step youtube assistance and I am almost there. That is everything seems to run without errors, but my result is only a transient black screen then back to the default Android home screen - not the static button screen. The screenshot catches the momentary black state - no button. Maybe this is a stack issue?

Thanks very much,
Bernie
Attachments
almost.jpg

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

Re: Trouble building app for Android

Post by LCNeil » Sat Nov 29, 2014 11:52 am

Hi Bernie,

A black screen on launch usually happens when Android 2.2 has been used as the AVDs android version. This is more a bug with the emulator and relates to the sensor settings of the AVD. More information on this can be found here-

http://quality.runrev.com/show_bug.cgi?id=9933

The easiest solution is to use an Android version greater than 2.2

With that being said, the standard Android emulator is terribly slow as it has to emulate Android hardware. This means performance depends on computer spec and type of AVD created. I would highly recommend reading my blog post on using the genymotion Android emulator as you will have a far better experience testing your application within this

http://livecode.com/blog/2014/10/15/tur ... -emulator/

Kind Regards,

Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
--

bmalkows
Posts: 12
Joined: Fri Nov 28, 2014 6:47 am

Re: Trouble building app for Android

Post by bmalkows » Sat Nov 29, 2014 3:28 pm

Neil,

I had read about the 2.2 black screen issue so I stayed clear of it by setting the AVD to 2.3.3. Please see my AVD screenshot settings - not sure if I had to specify it in the standalone settings so I did as well - no luck here either.

Maybe I have too many SDK build tools installed?
Attachments
forum collage.jpg

newtronsols
Posts: 192
Joined: Tue Mar 11, 2014 12:57 pm

Re: Trouble building app for Android

Post by newtronsols » Sat Nov 29, 2014 4:19 pm

You are using the the default identifier - might be worth changing and write external storage, and tick write external permissions. I've also always had some requirement ticked like touchscreen.

bmalkows
Posts: 12
Joined: Fri Nov 28, 2014 6:47 am

Re: Trouble building app for Android

Post by bmalkows » Sat Nov 29, 2014 4:47 pm

Thanks,

What test identifier might I use - any fictitious? Where is the the tick to write external permissions?

Bernie

Post Reply