Getting Started With Android Development
I often get asked for tips on how to learn to make Android apps, so I have decided to jot down a few steps. 0. Install the Android SDK and Eclipse
Follow these (goo.gl/Hs8h9
) steps to get started. (PS. You're a programmer now, so get used to starting to count from zero.)1. Run through some basic tutorials.
There are introductory tutorials on the Android Developer site (http://goo.gl/JuOEN
), but I found these tutorials to be a great resource (http://goo.gl/TjL6g
- there are 4 parts to run through) when getting started. This (http://goo.gl/VVvTx
) is also well worth a read.2. Start small and work your way up.
Focus on the basics initially: Instantiate an Activity and display a layout from an inflated xml file. After that, display a Toast message with your string declared in strings.xml. From there, add a button that when pressed, loads another Activity. Experiment with different layout types. Keep building and learning from there.
Your end goal might be to write an app as large as Gmail, but you should break your app into many small, manageable tasks, and implement them piece by piece.3. Learn how Android apps work
Familiarize yourself with the Android Design guidelines. In fact, learn them off by heart. Use any manner of Android apps, and learn lessons from how the best apps function and what not to do from the bad apps.
Build and run the projects in the <sdk>/samples/<platform-version>/ directory. I particularly recommend the ApiDemos project, which does a great job showcasing a great many of the Android building blocks.
You can of course always download the Android source and peruse the official apps such as People, Messaging, et al., but I wouldn't recommend that when you're getting started. Unfortunately these apps often use a lot of private APIs (which you and I don't have easy access to), and will likely have the same namespace as apps on your device. This means that you can't just import them into Eclipse and start debugging the app to see how it works. At least not without a non-trivial amount of effort.4. Get Social
Google+ is a fantastic discovery source for Android development. If you circle the right people, you will get a constant stream of handy libraries, video tutorials, app clinics and more, as well as a somewhat direct line to members of the Android team.
From the Google/Android side, I recommend circling: +Adam Powell
, +Ankur Kotwal
, +Dan Morrill
, +Dianne Hackborn
, +Jean-Baptiste Quéru
, +Kirill Grouchnikov
, +Matias Duarte
, +Reto Meier
, +Roman Nurik
, +Romain Guy
, +Xavier Ducrohet
, +Android Developers
Also, if you circle the following people from the 3rd party development scene, you are guaranteed to learn a lot: +Chris Banes
, +Cyril Mottier
, +Eric Burke
, +Jake Wharton
, +Jesse Wilson
, +Juhani Lehtimäki
, +Koushik Dutta
, +Lars Vogel
Listen and learn from these smart folk.5. Don't make excuses. Just do it.
Assuming you have a PC and an internet connection, you have everything you need to get started with Android development.
Get reading, and start writing. You'll likely get frustrated along the way, but that's OK. Take a walk and come back to it. There's always something else to learn.
Finally, if you're not having fun, you're doing it wrong!Misc helpful tips
a). If your Google search result comes up empty, try a different search term, as you're probably searching for the wrong thing.
b). Make good friends with stackoverflow.com
. If you have a specific question, chances are you will find the answer there.
c). When looking for libraries to use in your projects, I'd recommend looking here (http://www.theultimateandroidlibrary.com/
) first. It's easy to burn a lot of time evaluating libraries, and generally, if a library is listed there, it will both be a very good place to start and hopefully save you some time.
d). A library such as Bug Sense, ACRA or +Crittercism will help you track down FCs in your app when you're not connected via the debugger.
e). logcat is used for displaying Android logging messages. Keep an eye on it, especially messages coming from your app.
f). If possible, I'd avoid the emulator when you're getting started. In my experience, development is much easier and reliable (not to mention faster) when deploying straight to a device.
g). Don't allow yourself to get stuck on one particular problem for too long. If something you're working on is giving you grief, take a break from it and look at something else. Time away from a problem often brings the clarity you need to get past a roadblock.
h). I recommend using Eclipse to get started with Android development. It's by no means a perfect IDE, but it is functional and there are plenty of examples online about how to configure it for Android. IntelliJ is another very good option.
i). I've not touched on learning Java. This wasn't an issue for me, as I found it easy to pick up given my previous programming experience. This (http://goo.gl/PGdHm
) thread might be a good place to start. Failing that, there's always google.com
Hopefully this is of help to someone :)