Tuesday, March 23, 2010

Android - learning to program

Well, I bit the bullet.  I decided it was time to learn how to program in the Android space.  Plus I wanted to do it on my mac.  First thing I had to ask myself was: What the heck language did Android use? I was praying Java, as it was Google that was doing this...but  fearful it was going to be yet another different language I was going to have to learn in the process.  Mind you, I am not complaining I need this type of practice.  But still...

OK so first things first. What did I do?  I did a search using keywords "tutorial Android".  I also used "netbeans android tutorial" cause I am using the Netbeans IDE rather than Eclipse.  I like Eclipse but it I like netbeans better - probably because it was the IDE I used to learn Java in my "Learn Java in 21 Days" book.  If I sat down and worked with Eclipse for a while I'd probably figure it out.  *shrug* if I find the plug-in support netbeans isn't sufficient then sure..I'll do it.

 Results of the search: found a crap ton of stuff.  Not a big surprise..but still surprised to find that they had a plug-in for netbeans in the first place.  Interested in the link I chose?  Here you go:

http://wiki.netbeans.org/IntroAndroidDevNetBeans


This took me to everywhere I needed to get started.  It included:
  • Getting the SDK installed
  • Getting the plug-in setup in Netbeans 
  • and probably more - but wanted to try running a basic Hello World and ran into issues.
  • which I am now researching.
My first issue I ran into:  I didn't realize you have to install the SDK yourself.  I've gotten spoiled when I worked with our Dev Suite at Embarcadero - we provided the SDK's for you.  Not so much with trying Android.  I can't complain - it's free...


Next issue I ran into with my mac: If you're running a mac and you want to create a virtual device that the emulator will attach to,  or run any of the tools for that matter, I found I was getting "Command Not Found" anytime I tried something from within the Terminal window.  Turns out I was calling the commands as I would in Windows/DOS... *smack on the hand* bad girl!  You need to start thinking Linux..hmm..wonder if there is a Cabrillo Class online for learning Linux stuff. :)

Anyway, I found this link showed me what I was doing wrong.  Now I have a couple of virtual devices created that I can have the emulator link to... YAY!!! I just figured that out. 

Now: for those of you who want to get started with Android using Eclipse - you're life will probably be easier because the Android Doc's reference that plug-in as the defacto plug-in.  :)  For that see the following link:

Main Home page for Android: http://developer.android.com/index.html

SDK page: http://developer.android.com/sdk/index.html
 - you'll find the installs as the first thing for the SDK here.
 - Also in the instructions it talks about working with Eclipse and the ADT (Android Dev Tool) plug-in for it.

Dev Guide: http://developer.android.com/guide/index.html 


So now I'll go try out Hello World and report back in the next blog post. :) Ciao for now!

No comments:

Post a Comment