Unable to build app for testing
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Unable to build app for testing
I am trying to test on a android virtual device. I followed the documentation.
1) installed live code 4.6.1
2) installed Android sdk and JDK
3) created a virtual devices in the adroid sdk and avd manager and start the device.
4) configured the livecode preference "mobile support" android development sdk root.
5) selected the test target.
When I hit the test button, the message "Unable to build app for testing: could not compile application class".
Any idea what I am doing wrong.
Thanks
Darry
1) installed live code 4.6.1
2) installed Android sdk and JDK
3) created a virtual devices in the adroid sdk and avd manager and start the device.
4) configured the livecode preference "mobile support" android development sdk root.
5) selected the test target.
When I hit the test button, the message "Unable to build app for testing: could not compile application class".
Any idea what I am doing wrong.
Thanks
Darry
Re: Unable to build app for testing
The steps you list sound good. That's pretty much what I've done and it is working for me.
Make sure you are targeting a virtual Androird OS version of 2.2 or higher.
Have you tried creating a very simple 1 stack 1 card application (text/rectangles/buttons -- no code) to make sure it's not something particular to the coding in your app?
--ForrestD
Make sure you are targeting a virtual Androird OS version of 2.2 or higher.
Have you tried creating a very simple 1 stack 1 card application (text/rectangles/buttons -- no code) to make sure it's not something particular to the coding in your app?
--ForrestD
Re: Unable to build app for testing
Yes, it is targeting a virtual android device platform 2.2 API Level 8.
My test livecode is 1 stack with 1 control and no code.
By the way, under the preferences/mobile support section. The JDK Path: (none). Is this normal?
Also, I installed it on another machine and this time, the test target "Android emulator - 5554" is grey out. I can't selected.
Any ideas?
My test livecode is 1 stack with 1 control and no code.
By the way, under the preferences/mobile support section. The JDK Path: (none). Is this normal?
Also, I installed it on another machine and this time, the test target "Android emulator - 5554" is grey out. I can't selected.
Any ideas?
Re: Unable to build app for testing
I had this problem also. I am running 64bit Windows 7.
I had the wrong version of Java Installed. I removed the version I had installed. It was installed in Program Files (x86).
I installed jdk-6u24-windows-x64.exe and it installed in C:\Program Files\Java\jdk1.6.0_24 by default.
Start LiveCode and it should now show the path to JDK. It should work now at least it did for me.
Good Luck
jharris
I had the wrong version of Java Installed. I removed the version I had installed. It was installed in Program Files (x86).
I installed jdk-6u24-windows-x64.exe and it installed in C:\Program Files\Java\jdk1.6.0_24 by default.
Start LiveCode and it should now show the path to JDK. It should work now at least it did for me.
Good Luck
jharris
Operating System: macOS Monterey Version 12.5
LiveCode Version: 9.6.8
LiveCode Version: 9.6.8
Re: Unable to build app for testing
That did it.
Thanks JHarris...
Thanks JHarris...
Re: Unable to build app for testing
No problem... I spent several hours trying to figure that one out.
jharris
jharris
Operating System: macOS Monterey Version 12.5
LiveCode Version: 9.6.8
LiveCode Version: 9.6.8
Re: Unable to build app for testing
getting "apk preparation failed" message, the pref's seem in order, is this a setup problem with the Adroid sdk or LiveCode?
Re: Unable to build app for testing
I'm having the same problem (apk preparation failed)
Running on Windows xp
Running on Windows xp
Gimp
Desktop 32 bit Windows XP SP3-Laptop 64 bit Windows 7
4.6.1 Build 1392- Android Personal
HTC Thunderbolt 2.2
Desktop 32 bit Windows XP SP3-Laptop 64 bit Windows 7
4.6.1 Build 1392- Android Personal
HTC Thunderbolt 2.2
Re: Unable to build app for testing
I've not seen the error, but a quick google search suggests the problem may be with the android sdk. I would google it if no other suggestions are offered.
I found this on a google search... not sure if it will help or not.
I found this on a google search... not sure if it will help or not.
jharrisImproper Windows system locale cause Eclipse to not build the APK file.
The problem seems to be affected with any project that is created when the
Windows system locale/location is not English, United States.
The most simplest project as "Hello Android" also suffering from this problem.
Operating System: macOS Monterey Version 12.5
LiveCode Version: 9.6.8
LiveCode Version: 9.6.8
-
- Posts: 1
- Joined: Mon May 21, 2012 3:23 pm
Re: Unable to build app for testing
Can you test in an Android sim with the trial? Or do you have to have the full licensed copy? I am having the "apk preparation failed" error with my trial. I have uninstalled and reinstalled Android SDK 3 times undated to rev 19, I have JAVA JDK1.6.0_32 and am using Android ver 2.2 and still get the error. System is Windows 7. I'd like to have a full test before I go to my boss to purchase this software, which I think is very simple and useful but would be an easier sell if I had a sample to show. Thanks
-
- VIP Livecode Opensource Backer
- Posts: 75
- Joined: Wed Mar 09, 2011 6:48 pm
- Location: Northern California
Re: Unable to build app for testing
I'm getting the same "Unable to build app for testing: apk preparation failed" message when trying to test on my Android device.
However, this is just now appearing. I'm getting back into development after having not worked with LiveCode for a couple of months, and now this shows up out of the blue. I'm trying to work with a project that tested just fine when I last used LiveCode, and I haven't changed anything since then.
Does anybody have any ideas, or has anybody experienced the same thing since the last posts? I don't know where to start on fixing this.
Thanks,
Gene
However, this is just now appearing. I'm getting back into development after having not worked with LiveCode for a couple of months, and now this shows up out of the blue. I'm trying to work with a project that tested just fine when I last used LiveCode, and I haven't changed anything since then.
Does anybody have any ideas, or has anybody experienced the same thing since the last posts? I don't know where to start on fixing this.
Thanks,
Gene
-
- VIP Livecode Opensource Backer
- Posts: 7266
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Unable to build app for testing
This can be due to an issue with the .android file, which is a hidden file at the root of the user folder (on a Mac, anyway.) Deleting that file and restarting the emulator fixes it. You'll have to use Terminal or some other app that will work with hidden files to both find it and remove it. The file can become invalid for a number of different reasons.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 243
- Joined: Sun Dec 06, 2009 12:24 am
- Location: Fredericktown, MO
- Contact:
Re: Unable to build app for testing
Jacque:
You are wonderful! I have been experiencing this issue and noted your solution.
Downloaded "Houdini" to view hidden files/folders and deleted the hidden .android... LiveCode's working like a champ now...
Thanks, again!
:Todd
You are wonderful! I have been experiencing this issue and noted your solution.
Downloaded "Houdini" to view hidden files/folders and deleted the hidden .android... LiveCode's working like a champ now...
Thanks, again!
:Todd