Is it compulsory to have an Android device to learn programming for Android ?
Currently, Java is my primary programming language.
Software Engineering Stack Exchange is a question and answer site for professionals, academics, and students working within the systems development life cycle. It only takes a minute to sign up.Sign up to join this community
Now Android Studio is the preferred IDE to create Android Apps. Also hardware-wise at least Intel Core i3 processor and 4GB RAM should be used for decent performance. Of course more the hardware, better it is.
We do a lot of Android development at our work.
> Is it necessary to have an Android device to learn & programming for the Android? <<
No, Android SDK and Eclipse ADT Plugin should be sufficient to get you started. As far as hardware is concerned any Core 2 Duo machine (or equivalent) with 2 GB of RAM should work fine. Emulators are slow to start but once started they work quite OK. The trick is not to close it once started ;-).
For advanced programming you will want a device, for example topics such as accelerometer and GPS. (Android emulator let's you emulate some basic GPS but for actual device is necessary to deal with real world scenarios.
Also if you are planning to do professional Android development be prepared to buy at least 3-4 models by different vendors running different versions of the Android OS as each have quirks of its own. Clients will often complain that the program doesn't work on X device with Y version of the OS.
The Android SDK includes various emulators that you can run on your desktop system. Be warned, some of the emulators are pretty resource-hungry; there are several I can't run because my hardware is simply not up to snuff.
It's not the same thing as running on an actual Android device, but it at least allows you to get your feet wet without having to spend money.
I would say no... if it's just for learning the framework, then I don't think you need one. I agree with Michael to the extent that if you're developing apps for users to actually use, then you want a real device so that you can get a real sense of whether your application is usable or not. But for the purposes of learning, the emulators will suit you just fine.
One caveat is that if you're trying to learn tablet programming for honeycomb, then you might need to invest in a device. I don't know if it's gotten better in the last month or so, but when I tried the Honeycomb emulator it was way too slow and completely unusable.
Not necessary, but...
The Android SDK provides you with virtual devices you can use on screen, but without responding to true touch events and seeing the scale of your application on a device in your hand I think it is a poor substitute to understanding how users will truly interact with your application.
It depends on what you are tying to learn.
If you're wanting to learn GPS stuff, location management, etc, then you do need an actual device.
If you want to check dynamic UI such as horizontal/vertical screen orientation, then again you need the device.
There may be more instances such as these. But for general basic examples, you do not need the device. The built-in emulator is more than enough.
Just figure out what you're trying to do and then decided whether or not you need a device.