r/androiddev • u/[deleted] • Jan 11 '20
[Possible rant] Why Android development seems like a mess?
New here. And new to Android development. Developing in .NET is my job.
So I developed so far 3 Android apps by myself, and publish 2 of them to Play Store.
I just finished one's latest version and published, and I feel I want to share some of my experience on my Android dev journey. Maybe some rant and misunderstanding here, I apologize for this in advance (and please comment).
Simply put, I feel Android *seems* like a mess. Maybe I am still not proficient enough to get everything right at once.
- For very simple apps or scenarios, I think the default setup of Android IDE & SDK, as well as docs, is all right. But once I want to use more system features, or apply more designs, Android seems to be really hard or complicated to get everything right. The official Android dev docs seem good for learning, but if you have some special scenarios, it seems you are on your own.
(For example, if you want to send network / HTTP request, the official docs recommended using Volley / Cronet libraries, which are quite complicated to use if I want to achieve something like JSON-Object serialization (maybe I didn't get it right). This makes me wonder "Why the system itself does not have built-in network / HTTP API like Windows or Linux?". Not to mention, Retrofit+OkHttp is (IMHO) way much easier than either of them. Why this was not mentioned in docs?)
- Support / Compat libraries / classes. OH MY GOD. Maybe I don't fully know the logic behind this, but I hate these things. Every time when I try to use something, like, Activity or Fragment, I have to figure out whether I should use support libraries or system native ones. I know usually I should use support libraries. The problem is, some classes from libraries (maybe system also? I cannot remember) derived from the native ones. In some scenarios, if I want to use support library ones, I will get errors. I don't really know anymore.
- Outside Android system territory, it surprises me a lot that a lot of libraries are lack of proper documentation. I know this happens everywhere, not only in Android, but one thing I feel about Android is the lack of "conceptual consistency".
Allow me to present an example. When you are working on Windows, say, .NET, even though there are many differences in .NET BCL (Base Class Library) and 3rdparty libraries or even BCL itself, you still can have some expectation on how they approach the objective, since all .NET stuff has more or less a unified "feel" on design rules, so that you will not get lost very easy. Linux is kinda similar (but maybe this has my own factors - I did a bunch of Linux system programming).
But in Android, system does not provide a lot of stuff (either non-exist or simply broken), so a lot of 3rdparty libraries took over the roles what I think should be a part of system (like high-level network stuff). These libraries have their own (and sometimes hacky) ways to do things. But they sometimes don't provide good documentation to explain them, even for the new features. Examples such as:
- Retrofit2's Kotlin suspend function feature (what I can do, and what I cannot do, can I return a list instead of one object, or such)
- Dagger's DaggerApplication, DaggerAppCompatActivity, DaggerFragment, etc., and how to do ViewModels properly (I didn't know these classes until searched through tons of results online)
- Epoxy's generated models and integration with Android ViewModels ("I see red in Android Studio, it says Unknown symbol! What should I do???" / "why I cannot compile? - oh, different class name in package-info.java")
- Gson's ProGuard rules (Where is it? - Production build got my model classes stripped out and caused Retrofit stop working properly)
- The integration among all these libraries ("How can I use Epoxy + ViewModels + Dagger altogether???")
And it is quite insane that I have to use all these libraries in an Android to achieve "maintainability". Why Android doesn't have a built-in way to do these? Why Android Jetpack???
- Maybe I'm really unlucky. But for some reason, every time when I try to figure out how to solve a particular problem in StackOverflow, I always bumped into a page that has either no answers (10%), or has a bunch of answers without that green mark (70%, the rest 20% are jackpot). I thought tons of people use this System, so statistically most of the problems should already have answers. But nope.
(Not to mention tons of pages have outdated information. Gosh)
(...and because of the rapid changes on all Android stuff, it is impossible to find a friendly beginner book talking all these things I mentioned above - I like to read a book to get my hands dirty, and I think books are more trustworthy)
- Tons of blogs. No offense. I just never see this kind of things before. A lot of developers from all over the world write blogs in Medium or such to explain the same things in many different ways.
For example, Dagger. To be fair, Dagger is complicated because it tries to solve a complicated problem (dependency injection). But man, I read a lot, I wrote a lot, but when I first read these blogs, they just gave me tons of confusion (especially when someone uses outdated information). Even Google's official docs are confusing as hell (Thermosiphon? REALLY?) Where is the really official documentation???
- System bugs. This really shocks me. Like, a crashed NotificationListenerService must be restarted by restarting my device. Or, broken EditTextPreference not being able to limit inputs to numbers even if I set it so.
- Flutter / Fuchsia. I don't know whether Google is seriously considering using these to solve Android's issues...
Well, not quite pleasant. I guess maybe because I am still a beginner. I may misunderstand most of things here.
I can only hope I will get better on these things and not be frustrated easily like now.
1
u/GrandAdmiralDan Android NDK Jan 15 '20
I'm confused, because these appear to be image codecs: https://developer.android.com/ndk/reference/group/media#group___media_1ga9c3dace30485a0f28163a882a5d65a19
Filing bugs does not lead to features instantly. Those three are blocked waiting for https://github.com/android/ndk/issues/916. "Unplanned" does not mean "never", it means it's not currently planned for the next release.
Filing a bug doesn't guarantee that it will be fixed, but not filing a bug almost guarantees it won't be fixed.
There's no contradiction here. The goal is for you to be productive writing cross-platform and high performance code.