Unable to build app for testing...

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
keithglong
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 348
Joined: Sun Jul 03, 2011 2:04 am
Location: Gulf Breeze, Florida

Unable to build app for testing...

Post by keithglong » Wed Aug 20, 2014 12:16 pm

Hi All,

I am setting up my new Macbook Pro and am using Parallels to develop via both OS X Mavericks and Windows. Anyway, I have the iOS SDK installed and successfully running under Mavericks 10.9, and the Android SDK running successfully under Windows. Regarding the Android SDK for Mac, I installed it and all appears to be working well. (I can run the emulators, and my Kindle Fire HDX is recognized within LiveCode for testing.)

Anyway... When I try to test a simple LiveCode stack (on Mac) using both my Kindle and an Android emulator, all goes well at first (i.e., Building package, Preparing package, etc.). However, at the end I get the following message: Unable to build app for testing: apk finalization failed.

Any ideas as to what is happening here? I uninstalled and reinstalled the Android SDK for Mac several times to no avail. Any help would be appreciated.

(So close, yet so far away!)

Thanks,

-Boo
Gulf Breeze, Florida

Tukcedo
Posts: 65
Joined: Fri Jun 27, 2014 9:43 pm

Re: Unable to build app for testing...

Post by Tukcedo » Wed Aug 20, 2014 12:41 pm

Did you try to capture error messages with Logcat? It's an option to the adb program that you also use to set up the USB connection to the Android device (at least it is on my Ubuntu laptop). Personally I found a bug when you try to use SQLite under Android, also under Ubuntu.
Michel J.L. van der Kleij
Coding to help stray animals in the Philippines
Albert Foundation - http://albert.tukcedo.nl
Aklan Animal Rescue & Rehabilitation Center - http://aarrc.tukcedo.nl

keithglong
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 348
Joined: Sun Jul 03, 2011 2:04 am
Location: Gulf Breeze, Florida

Re: Unable to build app for testing...

Post by keithglong » Mon Aug 25, 2014 9:20 am

Update: I am now able to test Android apps on my Macbook Pro (under Mavericks) using emulators... To fix the situation, I had to replace the latest Tools folder in the Android SDK (i.e., the one included with the current Android SDK release) with an older version of the Tools folder: r21. (I renamed the existing Tools folder just in case I need the files for future use.) After that, I was able to successfully test a LiveCode app (via the Development > Test menu) in several emulators. I have yet to try it with my Kindle Fire HDX though, as my tablet is currently "out of commission."

And I see that similar issues have arisen before; see: http://forums.livecode.com/viewtopic.ph ... r21#p83306 , and so on...

@Tukcedo: Thanks for the suggestion. I haven't figured out how to successfully use Logcat yet. (I am new to Android development, so any advice is most welcome!)

Sincerely,

- Boo
Gulf Breeze, Florida

Tukcedo
Posts: 65
Joined: Fri Jun 27, 2014 9:43 pm

Re: Unable to build app for testing...

Post by Tukcedo » Tue Aug 26, 2014 10:17 am

I work on Linux and there the logcat command is something like:

sudo /home/<user>/<path_to_adb>/adb logcat

The sudo is because otherwise I can't get adb to "see" my Android (it displays "???????? Android" in adb devices). This however produces tons of messages on your screen so I use a few tricks:

sudo /home/<user>/<path_to_adb>/adb logcat | tee logcat.log

which produces a file "logcat.log" as well as display on the screen

sudo /home/<user>/<path_to_adb>/adb logcat | egrep "^E\/" | tee logcat.log

which filters on the errors only (they start the line with: E/......)

Hope this helps!
Michel J.L. van der Kleij
Coding to help stray animals in the Philippines
Albert Foundation - http://albert.tukcedo.nl
Aklan Animal Rescue & Rehabilitation Center - http://aarrc.tukcedo.nl

keithglong
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 348
Joined: Sun Jul 03, 2011 2:04 am
Location: Gulf Breeze, Florida

Re: Unable to build app for testing...

Post by keithglong » Tue Aug 26, 2014 1:14 pm

Thanks for the info. Will play around with it.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Unable to build app for testing...

Post by Mark » Wed Dec 10, 2014 5:04 pm

Hi,

I had the same problem. After many trials and errors, which took me several hours, I decided to change the file names. Some file names included symbols like &, ~, and even something like "´|". After fixing the file names, I was able to build a standalone for Android again.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply

Return to “Android Deployment”