Developing ANDROID sucks!

h2. DISCLAIMER: you guessed it, this is a rant!

I am very interested in doing mobile development as a hobby. I started iOS development about a year ago but i stopped after publishing “my first iPhone app dzone mobile”:http://dzone.nofail.de/ because i thought that all those AppStore(TM) and iTunes Connect(TM) stuff was a pain in the ass and distracting me from beeing productive.

So I began developing this same app for the ANDROID platform, in order to get a feeling for it. I’ve been doing Java for about 7 years now, so developing on ANDROID should be rather familiar to me instead of learning all this verbose Objective-C nerdy pointer stuff. I am very well known to Eclipse, so working with the ANDROID Plugin should be easy, right?

I started the app in November of 2010, when I had some spare time between jobs, but somehow I stopped in the middle of the project and just recently started all over. I was wondering why I had not worked on the app for about half a year?

The answer is simple: Developing ANDROID sucks!

h2. Eclipse

I stopped working with Java in the middle of last year, switching to Ruby development with TextMate and MacVim. Coming back to Eclipse is like getting hit by a truck! This IDE is so overwhelming, but instead of giving you what you need it hides “the most common features, so that you have to search for it on stackoverflow”:http://stackoverflow.com/questions/3175035/eclipse-find-in-project.

Is it really necessary for me to do Open-Clean-Refresh-Close-Open-Refresh cycles on my project to let Eclipse realize that everything is fine besides Eclipse itself?

Why do people, building Eclipse plugins, make the same errors again and again? Swallow errors, so that you need to have the Error Log View open all the time? Show build failures without any hints? Are you serious about that LogCat stuff? WTF?

I am using the debugger all the time when I am new to some Framework in order to better understand what is going on. But this is not very usefull unless you can see the source code of where you currently are… Guess what, it’s “reeeeally hard to get it going”:http://android.opensourceror.org/2010/01/18/android-source/!

h2. Emulator

The ANDROID Emulator is really slow on the Mac. I don’t know if it’s much faster on other systems, but i think it sucks. The startup time takes even more than eclipse, you need to “fiddle around with runtime settings in order to adjust it to your needs”:http://stackoverflow.com/questions/2359895/android-emulator-screen-too-tall and why is it so difficult to put all the options you have in the menu bar instead of “hiding it somewhere in the function keys”:https://sites.google.com/site/androidhowto/how-to-1/rotate-mac-emulator?

But the best thing is, that the “emulator is just not working right in the beginning”:http://stackoverflow.com/questions/3557996/android-httprequest-java-net-unknownhostexception.

It does not properly respond to mouse gestures or the keyboard and ah yeah, I forgott, it’s ugly!

h2. Desing-Flaws

Developing for iOS is a tough choice if one is coming from a language like Java that has a decent Runtime with garbage collection. I spent most of my development time with allocation/deallocation problems. This is something you really need to get into if you want to have fun working with Objective-C even though they “just released ARC (automatic reference counting) on iOS 5”:http://stackoverflow.com/questions/6368600/some-questions-about-automatic-reference-counting-in-ios5-sdk. Besides that, I really think that iOS does a better job in designing an architecture that is developer friendly.

The thing that I just can’t get over on ANDROID devices is that the application (the activity to be precise) is going to be reloaded if you rotate your device and you need to take care of a lot of things in order to let your app respond to that interaction. Just have a look at “_your future self_”:http://developer.android.com/resources/articles/faster-screen-orientation-change.html …

It’s really sad to me, that the ANDROID designers decided to repeat the bad design decisions that had been established in Java Enterprise(TM) all over again! It took the Java community about a decade to step back and come to frameworks where developer productivity is THE thing to focus on. All the rookies that start their “Java career” with ANDROID will be doomed to go through this same process again! Poor bastards…

h2. XML

Finally! Let’s define everything in XML! I am getting bored at bashing on XML…

$ find . -name "*.xml"
./AndroidManifest.xml
./res/layout/details.xml
./res/menu/options.xml
./res/values/strings.xml
./res/xml/preferences.xml

iOS is also using XML for their interfaces, but they hide all that shit behind a really decent “InterfaceBuilder”:http://developer.apple.com/tools/interfacebuilder/!

The Builder and XML Tools in the Eclipse Plugin are so ugly that i rather write the whole shit by hand, BITCHES!

h2. Tight coupling

Why, for gods sake, did they come up with the idea to use inheritance for everything in ANDROID? It’s even worse than in J2EE because you are not bound to Interfaces but Classes! Hello dear ANDROID designers, there is no such thing as Mixins or Multi-Inheritance in Java?! How am I supposed to write clean code with that? Answer: You are not going to write clean code anyway, because you have to do premature optimization on your code so that it can run on all the shitty ANDROID devices! YEAH!

Just forget everything you learned form state of the art frameworks like MVC or DI. It’s just not possible! BY DESIGN!

Just put state, lifecycle, business and view logic in one class; also helps reducing your package size, HOORAY!

h2. Checked Exceptions

Do we really need more Checked Exceptions? Really?

h2. Testing

Writing tests for iOS was nearly impossible at the time I was doing it. Even the guys at the Cocoaheads Hamburg did not know how to get it running. But this situation has improved over the last months. Special thanks to XING for doing a lot of research there and presenting it on the Usergroup!

I thought that testing for ANDROID would be really cool, because the Java community has a really strong background on TDD and “Testing is even a Topic on the Dev Guide”:http://developer.android.com/guide/topics/testing/index.html, even though it is the LAST one…

Let me make it clear to you: Testing ANDROID sucks!

Because of all the tight coupling and multithreaded environment it is nearly impossible to test something. Even simple tasks like testing your Utility-Methods needs to be done in the Emulator! Just have a look at this “multiscreen setup guide of how to get it running with JUnit”:http://mobile.tutsplus.com/tutorials/android/android-sdk-junit-testing/ (Hello?! JUnit 3 is deprecated for YEARS!).

Despite all this crap, I finally did it! So please test “my dzone application”:https://github.com/phoet/dzone_android, because I do not own an ANDROID phone myself…

58 thoughts on “Developing ANDROID sucks!

  1. gaby

    I´m developing on Android since 2011.
    Some things improved:
    – now we have Android Studio (which is still buggy but looks much more promising than Eclipse, soon it will be able to replace Eclipse, maybe in a couple of months)
    – The *View Classes improved big time in Android 4.2 (you still need to integrate compatibility libs for older OS)
    – On new phones you now have bigger allowed heap size per application. Allowing you to manipulate bigger images (you still need to take care of your references in order to avoid OutOfMemory Error)
    – Eclipse does not crash that often as in 2011, I would say now only once in 40 hours of work.

    What is still bad:
    – Eclipse still has the very annoying bug when you correct an error in *.XML/*.java and it still points you an error there. Workaround, cut and paste back the lines of code before and after the error, and the Red sign is gone.
    – Garbage collector is so f. slow
    – Image manipulation is still a pain in the ass
    – Emulator is still crap
    – Writing the XML Layouts takes really ages, testing them and debugging, even longer
    – Development time improves with experience but cannot cross a certain barrier which is not far from the one you faced after about 6 months of experience.

  2. daniel

    Mi case is similar more than ten years programing with java , I love it, then I started two years ago on ios and is not perfect but is very nice and xcode is very very good, well i read 3 books for android and started a new app, I hava more than 30 in IOs , my god !!! everything in my last year book deprecated and examples on web same thing, emulator very slow, so make an app for six months and then is deprecated almost all the app !!!
    a lot off versions , in ios you have ios6 and now 7 and thats it , on android is a mess , all versions all kind of phones and people at google changing everything deprecated, this is not like java at all, this seems like a college open source project.
    Plug in for eclipse so bad, de designer tool for xml really sucks
    So at least for me, Java rocks but android sucks

  3. Andrea Leganza

    Developing from 2008 in iOS and many times on Android using both Eclipse/IntellijIdea/Android studio/Unity3D .

    I agree with you.

    1) XCode wins in terms of speed, no plugins needed to do all you need it’s all embedded. If there is an error Xcode knows 99% of times where it is.

    2) Interface editing wins in terms of speed and simplicity -> XML is hidden from developer inside XIB file format. The XML era for Android is still around but seems to fade slowly, when i created my first Android application i spent hours writing xml to show something instead on spending time on code what the interface had to do.

    3) Testing: simulator uses hardware resources so it’s not ideal for testing heavy apps but at least i don’t have to wait quite a minute until the android emulator starts, and if i have to configure another kind of device i have to create another new configuration, stop the current one, restart the emulator, wait: CAM’ON….

    4) XCode Instruments: perfect for testing and performances/leaks/zombies on both simulator and device.

    5) Resolutions: iOS: 3 retina resolutions and 2 not retina (with iOS7 only 1 not retina, 3gs will be gone)…Android: over 3000 devices (i’m not joking) every one with its own resolution, density, performances this need to buy many devices to test if your app really works on them. With iOS buy a iPod touch 4g and/or iPad 3 gen and you are ready to test/deploy to the whole world.

    6) API: Try to read the Android section about resolutions and you start asking WHY the hell you reached that page (“go there”, “better to avoid”, “unsupported from x to y”, “follow this link”, “deprecated”…) etc etc. Fragments are really fun, you have to use compatibility package to support older device, download it, modify your code to let this work for both 2.x and 4.x resolutions.

    7) Google play device compatibility…you publish and discover you cannot disable all the devices and enable only the one you tested on…YOU HAVE TO DISABLE BY HAND 3000 and over devices…or try to understand and fear the largestWidthLimitDp/requiresSmallestWidthDp/smallscreen/etc properties discovering that are only from api 13…

    After 5 years of development every time i have to create a project and someone asks me about android i prefer to avoid with the exception of when developing with Unity3D, in the other cases it’s really the NIGHTMARE of every developer.

    The Android team probably didn’t know how to address the developing from the beginning and year after year they try to correct all the errors, but now developers are handling a chimera, i’ve never seen from 1997 a huge EPIC FAIL in terms of API development, not even Microsoft did this in decades

  4. Alex

    With the new version of the eclipse adt bundle, you can’t even create a new Android Project!!!

    That thing is a piece of shit!!!

    I hear you dude!!

  5. IAgreeWithYou

    You’re damn right about everything on what you just said. But holy s#^* is Java bad…. When I was trying to implement a new protocol, as you can guess it, there is ABSOLUTELY NO UNSIGNED INTEGER AFTER 2 FREAKING DECADES WHEN JAVA CAME OUT IN 1995!!!! And rest of the retarded folks just wave it off to say, “Oh you can do it with Bit Operators” nonense. And now I have a guy riding on my ass to create ANY Android APP and guess what? I don’t do GTK bullcraps, because I hate it by it’s very nature and Android is just like GTK. Android doesn’t even have an unsigned integer for pete’s sake and I need it for clean code! Quite honestly, I rather program in C++ than Java and I don’t even know C++ enough to write an app with it, but I know enough that it is cleaner than Java. Seriously, Android, wtf with a single language dominance, didn’t they know that Linux was coded in C and yet they refuse to let us publish C apps…

    Whoever create Android are retards, that all I have to say.

  6. wert

    Emulator is crap unless it is run on windows. However now there is third party genymotion which is fast enough for development.
    Eclipse hopefully will be replaced by android studio.
    Still dumb bullshit with flawed java development and stupid activities is pissing me off. Sometimes even I think NDK is more suitable for some thinks than Java SDK.

  7. Daniel

    I could not agree more. I developed my first iOS app in just a couple short weeks, having never used Objective-C before (I’m actually a big fan of O-C now). With Android I spend 90% of my time dueling with XML and rediculous layout issues. The whole thing feels buggy and overly complex – while not actually doing anything you tell it to.

    Makes me want to rip my head off and kick it across the room.

    I dont even bother with the Emulator – I just run on a device, but even that takes precious time. So far Android development is a fricken nightmare.

  8. Graham

    My case is nothing like yours and almost everything like yours at the same time. I have been coding only for a couple of months and learned java so that I could make apps for my phone ……. initially! I did a few courses made a couple of little console apps then made a swing app that worked as a BPM delaytime frequency calculator… finished it made an icon and bundled it as a mac app in the terminal. All things I had no Idea how to do a couple of month ago! So i’m thinking yes! where to go now? I know android!!!!!!!! WHY?….. WHY? Seriously WHY? Java seemed almost enjoyable to write…. as enjoyable as coding will be… I had a blast flying through solving problems and enjoying it…. truly. Android….. what is this…. it’s barely Java at all. My personal first impression of android is …. Yes I agree it sucks….. but it’s like someone looked at what made java good. The class libraries and their intuitive nature, the commons, the structure, the cleanliness and general speed….. then you open eclipse for a new cause , buttons change and move and then you add a basic project with folders all over….. OK fine I can deal with that but buggy graphical editors, awful xml editors and code that just seems ridiculously over-complex. Granted I haven’t been coding as long as you but I feel very at home with Java and this is just in different world!

Comments are closed.