Things You Learn as an Android Noob

Standard

 

I’ve been trying to get my head around Android development for about a month now.

Programming of any kind is notorious for having a steep learning curve, but I certainly couldn’t predict some of the quirks that came up when beginning Android development.

If you’re looking to get started, prepare yourself for some surprises. If you’re a seasoned developer, take the time to look back and laugh.

 


 

1. Getting started is a week-long process.

You might think you’re ready to roll. You’ve downloaded Eclipse and you’re pumped to get programming. But wait, it’s making me download a plugin. Oh, my SDK isn’t up to date. Oh, I can’t use that API. I finally write a program, but I can’t run it without an AVD. And I can’t run an AVD without downloading HAX. Who knew setting up could be so difficult?

The end result (many, many errors later):

Hello, World.

Or even worse, the app doesn’t run (see #2).

 


 

2. Android runs away from its problems.

Got an error?

Unfortunately, MyProgram has stopped.

Thanks, Android. I hadn’t realized that my beautiful app had ceased to run. Your explanation has provided so much clarity as to what type of errors it encountered. I definitely don’t want to throw this device into the nearest wall now.

Nyan Droid?

 

The error logging system isn’t exactly user friendly, and takes some getting used to (read: there’s a lot of cryptic red text). At least the icon is cute:

 

 


 

3. Choosing the correct API Level is an art.

Android recently released API 20 and 21, leading me to believe that these were the newest and best. For newbies, they’re definitely not.

API 20 is for Android wearables. I didn’t put much thought into that until errors starting popping up, and my EditText’s started disappearing into thin air. It makes sense when you think about it: you can’t input text on a SmartWatch. However, it’s pretty confusing to someone who can’t tell Honeycomb from KitKat from Froyo (see #4).

API 19 (KitKat) is a pretty good bet for a working compile target. But once you’ve got that in place, the minimum SDK becomes a whole other problem.

With a minimum SDK of API 8, you’ll hit over 90% of Android users. Cool. Unless you want to implement new features, like tabs, or ViewPagers, or NumberPickers. For some of these, you’ll have to up the ante and set a minimum of API 11, or even 14. Not a big deal, unless you realize it midway through a project and have to traverse the dreaded Manifest (see #5).

 


 

4. Android is hungry.

Ask an Android user what OS version they’re running. I dare you. I bet the response will make your mouth water.

Here’s the versions to date:

  • Cupcake (1.5)
  • Doughnut (1.6)
  • Eclair (2.0–2.1)
  • Froyo (2.2–2.2.3)
  • Gingerbread (2.3–2.3.7)
  • Honeycomb (3.0–3.2.6)
  • Ice Cream Sandwich (4.0–4.0.4)
  • Jelly Bean (4.1–4.3.1)
  • KitKat (4.4–4.4.4)

Cute, they’re even in alphabetical order. The next one to come (which is already released as a developer preview) is “L”. Any guesses on its confectionary name?

 


 

5. AndroidManifest.xml is important, but you’ll forget about it anyway.

Your application’s Manifest file is arguably the most important. It contains version data, general app data, and a record of all activities. But, chances are, you won’t even need to touch it until you try to add an Activity.

Setting up a button that launches a different Activity is an important step in the first few hours of Android development. It involves coordinating your “onClick” setting, a launch method, and a new activity with its own layout. I bet you forgot something.

You have to declare your activities in the AndroidManifest.xml. It’s kind of like a hovering mom: if she doesn’t know about it, it ain’t gonna happen. You can make plans with your friends and have everything organized, but if mom says no, nothing will compile work out.

I guarantee you’ll forget it at least once, and you’ll feel really dumb. I definitely don’t speak from personal experience.

 


 

Have fun in the Android world! I’ll be tweeting more quirks I come across, so be sure to follow me.

Do you have noob stories? Send them to @arielle_van or comment below!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s