1. 15

    I’ve had to do some Android dev recently, and it’s the worst development experience I’ve ever had. Everything about it is a mess.

    Basic development tasks (profiling, etc.) can’t be done without rooting your device and voiding the warranty. There are arbitrary changes to the tooling so often that any info on the web from 2017 or earlier is completely out of date and not applicable any more. If there’s a StackOverflow answer from 2013, the solution has probably changed 5 times since then, and the tools mentioned in the answer won’t even exist in the SDK/NDK any more. They took two industry standard tools (Linux, Java) and created a bastard child incompatible and different than both of them. It’s a disaster.

    And Android Studio is the worst. The UI is ugly and confusing with a million buttons and panels all over the place. The icons are meaningless and un-intuitive. Gradle is terrible. 32 Gb of RAM and an SSD, and it’s still slow and laggy. It’s horrible.

    Needless to say, I’m absolutely not surprised they’ve made another arbitrarily major change.

    1. 7

      Basic development tasks (profiling, etc.) can’t be done without rooting your device and voiding the warranty.

      Are you sure? I have profiled apps with my device that is not rooted perfectly fine. Not sure what other development tasks you are referring to that require your device to be rooted.

      I started mobile development for the first time last December, using Android Studio with Kotlin, and my experience has been almost completely the opposite of yours. Coming from primarily Python experience, I’ve really enjoyed learning Kotlin and using it daily – it solves a lot of the problems I had with Java, while being a touch more expressive than Python. I also don’t share your issues with Android Studio, perhaps since I’m coming from using PyCharm so I am already used to the Jetbrains IDEs. I use a laptop with 16GB RAM and haven’t had issues with slowness. I will admit that it is a resource hog though!

      I’m not trying to say your experience or opinions on it are “wrong.” I just wanted to share my experience with it as well, in case there are others that are thinking about trying it out.

      1. 5

        Are you sure? I have profiled apps with my device that is not rooted perfectly fine. Not sure what other development tasks you are referring to that require your device to be rooted.

        AFAICT there’s no way to use simpleperf or any other command line profilers without rooting the phone. I wouldn’t mind being proven wrong if anybody knows a way.

        And here’s another example I ran into the other day while trying to detect memory leaks in a native shared library.

        Here’s a SO question/answer from 2010 referencing DDMS, which doesn’t exist any more.

        The first answer now has a “2017 Update” saying to use Valgrind, and pointing here. But when you get there you’ll find out that Valgrind’s already deprecated (and removed from the NDK) in favor of LLVM’s ASAN, and it has a link to here.

        Note the first few paragraphs are about the new (as of Feb. 2019) HWAsan, so it’s already changed again.

        In any case, reading about software ASAN, you can see that using it requires copying ASAN enabled libraries into /system/lib/asan, which isn’t possible without rooting the phone. Profiling a single app requires running “adb root” and setting a “wrap” property, which also isn’t possible without rooting the phone.

        So I was stuck using the crappy memory profiler inside of Android Studio which doesn’t give any useful information about native objects except for the total size allocated.

        Straying back on topic, I don’t have an opinion on Kotlin. Our app is already written in Java and C++, and we don’t have any reason to change, and no time even if we wanted to. The syntax is nicer than Java, but that’s not saying much.

        1. 2

          I see. Based on your comment I thought you were saying you couldn’t profile at all without root. Makes sense! I understand your frustration. I must have just gotten lucky with what I was working on – most SO posts I ended up on would have a newer answer that was up to date with the now “proper” way to do something.

      2. 3

        Yeah, the last time I did any Android dev was Android 2, and it was just awful back then too. Good to know that things haven’t changed. It’s a shame too, because I’d love to write code that runs on my phone. But the development shenanigans are too much for me to push through in my leisure time.