Page 1 of 1

Unable to build app for testing...

Posted: Wed Aug 20, 2014 12:16 pm
by keithglong
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

Re: Unable to build app for testing...

Posted: Wed Aug 20, 2014 12:41 pm
by Tukcedo
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.

Re: Unable to build app for testing...

Posted: Mon Aug 25, 2014 9:20 am
by keithglong
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

Re: Unable to build app for testing...

Posted: Tue Aug 26, 2014 10:17 am
by Tukcedo
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!

Re: Unable to build app for testing...

Posted: Tue Aug 26, 2014 1:14 pm
by keithglong
Thanks for the info. Will play around with it.

Re: Unable to build app for testing...

Posted: Wed Dec 10, 2014 5:04 pm
by Mark
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