Beruflich Dokumente
Kultur Dokumente
For this tutorial, Im going to use Eclipse, because frankly its the easiest and most hassle-free development tool for Android right now. If youre a NetBeans programmer, be my guest; but Ill use Eclipse today. Download Eclipse IDE for Java Developers (PC or Mac, 92MB) Note: This is a .zip file; when you unzip it you will be able to run it wherever you unpacked it there is no installer. Id recommend that you put this in C:\Program Files\ unless you plan on making it a portable application on a USB drive or something.
Select both of the resulting packages, and hit next this will download the Android ADT (Android Development Tools). Go ahead and start the download to obtain these two packages. Restart Eclipse (it should prompt you to on completion of the downloads). Were almost ready to start coding.
Dont feel obligated to download every single thing. Could it hurt? Not really. For me, however, I only really want to program for Android 2.1 and 2.01, so those are the only API packages I bothered to get (someday I may pay for my folly, but not today). Either way, get what you want (and you do need to pick one) and hit install. The SDK manager will install it for a little while go grab a snack.
Click Create AVD towellcreate your AVD. Select your AVD from the list, and hit Start to make sure that you do indeed have a working emulation of an Android phone. After a pretty lengthy start-up wait, it should look something like this.
Fool around with it and explore for a bit if you want, then close it up so we can get back to work.
Everything check out so far? Hit OK to save everything and lets go program.
public class HelloAndroid extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView tv = new TextView(this); tv.setText("Hello, Android"); setContentView(tv); } }
//==========End Code============ I would love to explain all of the code, but thats not exactly the point of this tutorial; the point is to get your feet off the ground. I know some/most of this is confusing; but its just how things are wired.
Thats it, congratulations! The task can be a bit daunting at first; and definitely confusing, but if you stick with it you wont be disappointed. If you step back and think about it, we only did a few really major things, the rest was just the process of connecting the pieces to make everything work.
Do you want to become an Android developer? Have you ever written an Android app, and if so, what did it do? As always I love getting feedback in the comments section. As someone who answered yes to the first question, Im in the process of learning to adequately code for my Android device, so do you have any websites or pointers that would help me or a fellow Android newbie out?