Android SDK development root

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: Android SDK development root

Post by marksmithhfx » Sat Aug 13, 2011 7:41 pm

that1guy wrote:So out of curiousity I installed LiveCode on a MacPro that is already setup for IOS development. I downloaded the Android SDK (left it in the downloads folder, and created the tools folder with the values from platform-tools).
Created a new key.
Tried to build a standalone app and I got the SAME error!

There was an error while saving the standalone application could not encode the class bundle.

This time the Virtual Devices does start an emulator when I click start.
Hope you are reporting these to support!

I know they are working on some Android fixes.

-- Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: Android SDK development root

Post by marksmithhfx » Sun Aug 14, 2011 10:34 pm

jclantonpboss wrote:Emulator is up and running fine. Now having same issue as That1Guy with getting LC to work with the Android Emulator or building Standalone Application on Windows 7. I keep getting the error 'Could not encode Class Bundle'.

Thanks in advance to anyone who has this one figured outl
I'm at the same point. One thought, a previous post mentioned you have to create a signing key. Does anyone have directions for doing that?

Thanks -- Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: Android SDK development root

Post by marksmithhfx » Sun Aug 14, 2011 10:37 pm

If anyone is still having trouble installing Android on the Mac to the point of selecting the Android SDK location from LC Preferences, email me offline at mark_smith at cpe.umanitoba.ca and I'll send you the directions I followed.

Cheers,

-- Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

that1guy
Posts: 5
Joined: Thu Aug 11, 2011 5:04 am

Re: Android SDK development root

Post by that1guy » Mon Aug 15, 2011 8:56 pm

Ok, again kudos to Tech Support!

For the Windows 7 environment it turns out there is an issue with the jdk 1.7. If you uninstall 1.7 and switch to 1.6 jdk the problem is resolved in Windows.
But....
The same issue is still occurring on a new MacPro for Android development. Not sure why. The IOS setup is working just fine.
I ran java -version in Terminal and validated that it is using jdk 1.6. And I do have the keystore available.
Dell M6500 Windows 7 16GB RAM
Targets: Windows, Android

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: Android SDK development root

Post by marksmithhfx » Mon Aug 15, 2011 11:49 pm

that1guy wrote:Created a new key.
Brian, I forgot to ask earlier... where is the process documented for creating a new android key? (I just must have missed seeing it somehow)

Thanks

Glad to see you got it running on Windows... lets keep our fingers crossed for the Mac.

-- Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

that1guy
Posts: 5
Joined: Thu Aug 11, 2011 5:04 am

Re: Android SDK development root

Post by that1guy » Tue Aug 16, 2011 5:59 am

I used this to generate my key

Windows: START»CMD
$ keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -validity 10000

Windows: Mac: Terminal
$ keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -validity 10000

It is fairly straight forward. Just open a CMD window and navigated to your Java sdk folder then go one level lower to the bin folder.
The trick that they havent stated anywhere is that you get prompted to supply the alias and password when creating an Android standalone. Had no idea it would be important.
So to make it easier I made it the same as my key.
Just a helpful hint :D
Dell M6500 Windows 7 16GB RAM
Targets: Windows, Android

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: Android SDK development root

Post by marksmithhfx » Wed Aug 17, 2011 2:29 am

that1guy wrote:The trick that they havent stated anywhere is that you get prompted to supply the alias and password when creating an Android standalone. Had no idea it would be important.
So to make it easier I made it the same as my key.
Just a helpful hint :D
Good to know (and I am always forgetting my damn pw's so good tip!)

Thanks
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

BarrySumpter
Posts: 1201
Joined: Sun Apr 24, 2011 2:17 am

Re: Android SDK development root

Post by BarrySumpter » Wed Aug 17, 2011 2:38 am

RunRev have 'fixed' the issue with having to have an Android Standalone key and trying to remember passwords etc.

In Standalone App Settings | Android | Signing | Sign for Development Only.

Then I don't have the distraction of having to have a key
and entering passowords everytime I build a standalone
until I want to start selling and distributing via the market, etc.

Not sure if its the same when developing on Apple OS.

hth
All my best,
Barry G. Sumpter

Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: Android SDK development root

Post by marksmithhfx » Wed Aug 17, 2011 3:06 am

BarrySumpter wrote: In Standalone App Settings | Android | Signing | Sign for Development Only.
Not sure if its the same when developing on Apple OS.
hth
Hi Barry, it is the same (so I am not playing with the pw thing yet). Here's a screen shot of my IDE, Android and iPhone sims all running the same program at the same time. Now, if I had VMWare Fusion or Parallels running.... :-)

-- Mark
Attachments
Screen shot All 3.jpg
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

BarrySumpter
Posts: 1201
Joined: Sun Apr 24, 2011 2:17 am

Re: Android SDK development root

Post by BarrySumpter » Wed Aug 17, 2011 3:19 am

Yeah, I'm using vmWorkstation Win WinXp Pro to emulate me MBPro.
Works well.
Unless you leave it long enough to time out.
All my best,
Barry G. Sumpter

Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.

that1guy
Posts: 5
Joined: Thu Aug 11, 2011 5:04 am

Re: Android SDK development root

Post by that1guy » Wed Aug 17, 2011 6:03 am

OK. You certainly cant say I dont give up easily. Tech Support again was fantastic and supplied a different dx file to go in the tools folder. Well I am fairly new to macs and no matter how I tried to download it the file came down as a shell program. Removing the file extension didnt help and I could not force it to run as an application.
Soooooo
I went to the Android3->Tools folder. Copied the DX file out of there and placed it in the Android8->tools folder.
And it was able to compile.
Have I've been doing development so long that this kind of installation didnt even phase me?? I know plenty of other people who would have thrown their systems in the garbage by now.
HA!
Dell M6500 Windows 7 16GB RAM
Targets: Windows, Android

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: Android SDK development root

Post by marksmithhfx » Thu Aug 18, 2011 1:38 pm

that1guy wrote:OK. You certainly cant say I dont give up easily. Tech Support again was fantastic and supplied a different dx file to go in the tools folder. Well I am fairly new to macs and no matter how I tried to download it the file came down as a shell program. Removing the file extension didnt help and I could not force it to run as an application.
Soooooo
I went to the Android3->Tools folder. Copied the DX file out of there and placed it in the Android8->tools folder.
And it was able to compile.
Have I've been doing development so long that this kind of installation didnt even phase me?? I know plenty of other people who would have thrown their systems in the garbage by now.
HA!
That1guy... how come your signature line says you are developing on Dell/Windows 7 and you're fooling with macs :?: But you win the prize for perseverance :mrgreen: Who would have thought that would work? There is a thread at this location http://forums.runrev.com/viewtopic.php?f=53&t=8789 that may be helpful in the future dealing with installing Mac files (at least ones that need to be chmod'ed)

Good work and congrats for getting it working. Now you can spend your time writing some real software :D
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

jens.greiner
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 14
Joined: Wed Jun 01, 2011 10:35 am
Location: Germany

Re: Android SDK development root

Post by jens.greiner » Thu Aug 25, 2011 10:50 am

that1guy wrote:OK. You certainly cant say I dont give up easily. Tech Support again was fantastic and supplied a different dx file to go in the tools folder. Well I am fairly new to macs and no matter how I tried to download it the file came down as a shell program. Removing the file extension didnt help and I could not force it to run as an application.
Soooooo
I went to the Android3->Tools folder. Copied the DX file out of there and placed it in the Android8->tools folder.
And it was able to compile.
Have I've been doing development so long that this kind of installation didnt even phase me?? I know plenty of other people who would have thrown their systems in the garbage by now.
HA!
Finally this way works for me too. I sent an email to Tech Support and they responded very fast with the above mentioned dx file. After changing the file rights to make it executable the Android emulator and compiling for Android is running well now. :)
Mac OSX 10.7.4 Lion, LiveCode 5.5 (Commercial)
on MacBook Pro 2.66GHz Intel Core i7 8GB RAM
Targets: iOS (iPhone 3GS, iPhone 4(s), iPad2), Android (Emulator), Mac, Windows, LC-Server (On-Rev)

jwkuehne
Posts: 37
Joined: Wed Nov 28, 2007 3:12 am

Re: Android SDK development root

Post by jwkuehne » Fri Aug 26, 2011 1:10 am

Yes, these instructions worked - move the tools in the SDK, move the dx file from Android-3 to 8, etc. A little distressing that only dedicated hackers can make this work.
Research Engineer
McDonald Observatory, Texas

dablock
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 23
Joined: Wed Apr 23, 2008 2:51 pm

Re: Android SDK development root

Post by dablock » Sat Aug 27, 2011 6:19 pm

For a tool marketed for it's easy of entry, THIS IS RIDICULOUS. Five plus hours wasted just trying to get this to work...and it still doesn't! :evil: And why do I have to scour the web to learn about this problem when important issues like should appear on LC's start screen & give me a link to fix it!?!?!

I've followed the suggestions (make a self-signed cert, copy platform-tools into android-8 folder*, copy the android-3 dx file into the android-8 tools, downloaded the DX file from another post & make it executable....argh!!!!) but LC fails to find the JDK Path & won't test because it "could not compile application class".

I'm running OSX 10.5.8 with java version "1.5.0_30". (And btw, the original dx fails upon execution because it can't find the dx.jar file. With android-3 & the rev supplied dx, it does find the lib/dx.jar file & is executing properly.)

So I'm still dead in the water & utterly frustrated. Any more suggestions? Sorry for the rant, & TIA!!!


* Be sure to copy, not move, the platform-tools folder. If you move it, you will get the "not a valid android sdk" error.

Post Reply

Return to “Android Deployment”