muzani
I've been developing Android since 2012. It was worse then. Still sucks now but isn't as bad. Esoteric errors are still the norm. With 10 years of experience you only have to swear a whole day when updating a library, instead of spending a week.

GPT does poorly with beginners - it's definitely something humans have advantage with AI and I expect the gap to get bigger.

I do not touch legacy projects anymore because they're always horribly broken, half the libraries no longer exist. Many of them are easier to rewrite than fix. You get weird bugs where A needs to be 1.71.0 but B needs A at 1.69.0 or 2+. Upgrading A to 2.0.1 will fix A and B but break CDEFG. Upgrading everything to max breaks switch-case, turns some of your brackets to lambdas, requires you to change your UI from XML to Kotlin, etc, etc.

If you want something to hack stuff with, I made this: https://github.com/smuzani/android-minimalist-template

Originally it was designed for AI with smaller context windows. But it works as a simplified version of our production codebase. The principle behind this is that you should have good peripheral vision and that the shape of the code resembles what it's trying to build.

worstspotgain
Android is an example of technical debt from poor caked-in design. Its problems are still stemming from being rushed to market (relatively speaking) two decades ago. It's had enormous success as the most viable iOS alternative, but at a cost.

On the flip side, consider PalmOS. It was SotA at its debut in 1996. In the early aughts, Palm made Treo smartphones when almost no one knew what a smartphone was. It had a multiyear lead, yet it got easily marginalized by iOS and Android. Its technical debt was from maintaining backward compatibility with 90's apps, and cost it dearly. To be fair, company management sucked too.

The moral is: caked-in issues suck, but if you're going all in with a design, the most important thing is to time it with the explosion of the market. Palm was too early, others like Maemo and Windows Phone were too late.

fngjdflmdflg
Yes, the Android SDK has to be one of the worst software packages to ever have been written. Just look at the sourcecode for TextView[0] if you want to see for yourself. 8,700 lines of code to show text on the screen? Well actually, TextView is actually a full blown text editor with the editing functionality turned off as a flag. EditText just wraps TextView and sets the `ediable` field to true. What genius software design! Ever wonder how those selection handles appear when you long press on text in a TextView? I wonder what component that is? Trick question – its built right in to TextView as well! It uses a popup window the displays the handles in global coordinates which it gets using a mixture of `getLocationInWindow` and `getLocationOnScreen`.[1] Another stroke of genius form the Android SDK! Want to change any of this functionality slightly? Now you have to make your own TextView starting from StaticLayout.

[0] https://android.googlesource.com/platform/frameworks/base/+/...

[1] https://cs.android.com/android/platform/superproject/main/+/...

kevmo314
Getting native libraries to work well on Android is a beast. I happened to have done exactly what you're describing though, specifically rendering libusb through an Android phone. My code is at https://github.com/kevmo314/kineticstreamer and you might be particularly interested in the CMake build at https://github.com/kevmo314/kineticstreamer/blob/main/app/sr...

Happy to answer any questions or help you out if you decide to keep going down this road, shoot me an email at [email protected]. Ultimately an Android phone is still just a Linux computer but jumping through the hoops is definitely hard.

samoit
I also agree that the development experience is awful. I have more than 10 years as an Android developer and Android Studio (someone remember when it was derived from Eclipse?) is painfully slow, even in modern machines. Just starting a new project is a ridiculously sluggish process. Also Gradle is a piece of hyper-complicated software that (almost) nobody is interested in, but it is there and you have to deal with it. Nowadays I am basically moving to Flutter, much more simpler and easier than kotlin.
johnklos
I remember asking some Android devs, "How do I install a compiler on Android?"

They proceeded to tell me what to download on my laptop. I repeated my question, emphasizing "ON Android". They gave me blank looks. I said, "I want to install a toolchain ON an Android device, and run it there. How do I do that?"

They had no idea.

I asked, "What if you want to compile something that requires compiling something, then using that something further down the line, like Perl?"

Again, no idea.

A platform without a native toolchain is a very awkward place to be. I stopped trying to wrap my head around it and stopped playing with Android.

westurner
/? termux USB webcam: https://www.google.com/search?q=termux+usb+webcam

Termux was F-droid only, but 4 years later is back on the Play Store: https://github.com/termux-play-store#current-status-for-user...

Termux has both glibc and musl libc. Android has bionic libc.

One time I got JupyterLab to run on Android in termux with `proot` and pip. And then the mobile UI needed work in a WebView app or just a browser tab t. Maybe things would port back from Colab to JupyterLab.

conda-forge and Linux arm64 packages don't work on arm64 Android devices, so the only option is to install the *-dev dependencies and wait for compilation to finish on the Android device.

Waydroid is one way to work with Android APKs in a guest container on a Linux host.

That Android Studio doesn't work on Android or ChromiumOS without containers (that students can't have either).

Larrikin
Android development is Kotlin. Sometimes C++, but I've never seen or worked on a project that needed it. Using any other language will be an uphill battle that will make your life harder.

OpenCV also has a warning and a guide for people trying to use it for Android dev https://opencv.org/android/. Did you look through this?

Also why do you want to use a USB camera when every phone has a couple cameras built in? I think you're going down a road of frustration if you think mobile OSes aren't built with completely different use cases in mind than desktop environments.

Theres a lot of information the Android dev site about getting up and running with the camera. You can pass a lot of the photo stuff off to other camera apps on your phone, but if you really need to do stuff in the app theres an official Android library for making your life easier. Theres also a lot of official Android libraries and well known libraries for images and videos that might be easier to work with than OpenCV. You don't actually say what you are trying to ultimately do.

Gradle is the part of Android dev everyone hates.

leros
I think you're just going through the learning curve of something new. You could make the same argument about a React/Next app being unnecessarily complicated with Hello World.
chillfox
Android development is definitely insane. Just the process for getting a dev environment setup is stupidly complicated compared to almost anything else.
ffhhj
Android Studio isn't that bad, but their design system is horrible. After years dealing with that crap I ended creating my own WebView wrapper and moved all the design and logic to HTML5, which I write by hand, never been a fan of frameworks. Even created a WASM obfuscator with Python, and my apps autoupdate without relying on Google Play, by dowloading a compressed package. Whenever these are taken down I just set a flag/link in the DB and the app will instruct the user to get the re-published app.

Sadly the golden age of the app store is long gone. I used to make thousands monthly around 2015 with silly apps, but all went down the drain by 2018. Making apps isn't worth anymore.

mijkal
I've found React Native, especially in recent times, to provide a very good mobile dev environment.

I wrote an app and had it running in both iOS and Android in no time (with minimal iOS dev and zero Android xp prior to that).

My app included the Jitsi video extension (with very customized Jitsi controls and self-hosted backend), so not just a simple CRUD app.

(To be fair, my background is mostly Node and React, but those skills made it a breeze.)

cylinder714
"PilBox (`PicoLisp Box') is a generic Android App which allows to write Apps in pure PicoLisp, without touching Java, and without the need of an Android SDK.

"You do not need to root your device. And - if you prefer - you do not need a separate development machine (PC or laptop): All can be done in a terminal on the device, and even in a Lisp REPL while the App is running."

https://picolisp.com/wiki/?pilbox

giantg2
"Using Python scripting and OpenCV, I had a working cross-compatible script in 10 minutes, for both Linux and Windows."

What took you 10 minutes would take me a long time to learn. I rather enjoyed making some basic Android apps. I didn't work with much hardware stuff and heard that part is tough due to all the variations.

qiqitori

    10 Install an app that is able to use UVC cameras
    20 If works goto 50
    30 Else Use a different phone and goto 10
    50 Find an open-source app that is able to use UVC cameras
    60 If it doesn't work goto 50 (find another app)
    70 Try compiling the open-source app
    80 If it works goto 150
    90 ???
    150 Reduce open-source app to minimum code necessary
    160 Add own code
    170 Make sure the phone doesn't overheat and/or develop a bloated battery when you leave it running for weeks and weeks
rcarmo
“even with AI assistants and Google guiding me” seems like part of the problem, because you’re missing the higher-level knowledge that Android, like all mobile operating systems, is a sandboxed environment where the supported runtimes evolved to facilitate low level hardware access and provide an “easy” GUI and touch development model, not a low-level one.

So you either reimpmentent the whole thing in a native way (using Java/Kotlin or C++ for lower level integration) or you’re SOL. You can embed Python libraries, but you’re better off learning to use wherever native analogues and frameworks the platform already support.

I personally stay the heck away from Android Studio (I got a very early start in Android development, so most of my projects are just Gradle/pom.xml or a Makefile atop a “normal” Java tree).

That said, you have _a lot more flexibilty_ in incorporating multiple languages and non-native frameworks than, say, in iOS.

crossroadsguy
It is pathetic. I have been an Android developer for more than a decade and some aspects of it have become shittier. One of the other, seems tangential problems, in Android development world is architecture fatigue. Every other week the cool kids will change to something else and everything else becomes "so old school". For what? No one knows. It's just because the upstream (i.e. famous) cool kids are doing that. One blog post or even tweet by them and your junior teammates indignantly start demanding we must rewrite the whole codebase to the new holy tunes. Then there are libraries. In a way that is great that we have so many libs especially compared to iOS dev world. But then even small tasks means someone just added a library and you have a hard time explaining that just because there is a library doesn't mean you should add it without thinking of the implications and maybe not at all add it if all you have to do add a bit of code on your own for a tiny task.

If you ever have to work with native code (or things like OpenCV) start praying from day one and never stop.

You need bigger and bigger laptops to even run that disgrace of an IDE Android Studio. This always gets me!

So dev tools/env? Oh, god! Fuck Google!

stefan_
You are just trying to do something that nobody cares about making work on smartphones, and so you are "on your own".

Trying to do userland USB in an Android app to talk to a UVC webcam connected through USB OTG is not something even a niche of apps care for, and the native camera framework definitely doesn't care about because if it was trying to workaround the UVC spec Android phone cameras would have never left the original Gameboy camera age.

So with no native support for your use case, you are now having to wrangle the pretty shitty libusb and the even more terrible libuvc in working within the confines of an Android app. And to the credit of Android, this is possible! People have made it work! People with in depth knowledge of how the parts fit together, that is, and so GPT won't be of any help.

2143
I'm not a professional Android developer, but a few years ago I did create and publish a small app to the Play Store (and discovered that there's whole new category of spammers promising to make my tiny app become #1!).

Android development is not simple. Take time to learn the architecture and underlying concepts. It took me a couple of weeks and some false starts to make sense of things (although back then I was a college student; a professional can probably get started faster).

kkfx
Android is a commercial modern platform, where developing MUST BE HARD to discourage most and makes the few who can rule the others, meaning the big ones. Windows is similar but being much older and born without the iron under control underneath it's much less, *nix systems tend to be open.

You are not crazy and the pain you feel is the pain of commercial IT. Not strictly need to commerce of course, but that's the modern common practice. The cure is FLOSS, mandatory, from the start.

nicebyte
Take it from someone who has worked on android dev tools - yes.
cageface
Not only is Android a mess but the Google Play Store is terrible too. There's now this insane requirement that devs have to find 20 testers on their own for two weeks before publishing anything and, incredibly, the Play Store review process is also qualitatively slower and worse than Apple's.

I think we're going to see the tendency accelerate to develop and validate ideas on iOS first and only later outsource a crappy Android port.

qwerty456127
> I have devices with USB OTG, and a USB-C hub for the webcam.

Using an external webcam with an Android device seems a fairly exotic scenario doesn't it? Whatever, I would intuitively expect (disclaimer: almost no experience in mobile development) the Android OS to detect a USB-attached camera as another built-in camera and expose it via common APIs rather than let you access it via some sort of low-level libs reading the USB.

lawgimenez
Started Android development back in 2011, Android SDK was just a plugin for Eclipse back then. It's way better now compared to before. Does anyone remember Ant, it was way worse.

But I feel you, if you don't have enough experience dealing with different Android, Gradle, AS errors then you're really having a bad day. But shouldn't be a deal breaker, just give it some time and more familiarity.

JourneyJourney
Piggy backing this topic. I started android developmentin 2011, did about 7 years of it. I took a contract job in a different technology.

I want to jump back to Android dev contracting, my two questions for the up-to-date Android devs: - Do you have any resource to catch up with what I missed in the past 4-5 years of Android development? - How is the Android job market these days, compared to the iOS one?

-

Toni111
Yes it is. Use Ionic/Capacitor to create an app in Angular/React/Vue like you would on web with html and Javascript, Capacitor then embeds the webview into a native app

You won't have to touch any horrible Kotlin nor Swift but still be able to publish the app on the stores if you want to.

ycombinatrix
Android app development is awful but compiling native binaries/libraries is not that bad ime. Super easy in Rust.
the__alchemist
The project directory structure of Android/Kotlin apps, at least as generated by Android Studio, is indeed offputting. I look at the rust and python programs I have for PC, embedded, and web, and can confirm that the android layout is more complicated than is required in those three domains
alpha_trion
It's not you, it is bad. It has been getting better. Developing with Jetpack Compose is a nearly a clone of the experience of building with SwiftUI in Xcode. Android Studio and the emulators are resource pigs still.
ChrisArchitect
Related from just over a month ago:

Why is Android Development so difficult/complex? (compared to Web and Desktop)

https://news.ycombinator.com/item?id=40742719

danpalmer
There's a bigger issue here: OP describes writing prototype software on a desktop, and compares this to writing more production-style software on a highly constrained mobile device. This isn't an apples-to-apples comparison.

Python packaging is notoriously bad, and while you can get a Linux/Windows compatible script without too much work, getting to a single executable that just runs is much harder. Cloning a repo, setting up a virtualenv, installing an openssl dependendcy or whatever, is just not something that exists in the mobile world. We have to put more effort into the packaging, and that means a higher bar for things like this. There are answers to this in Python that claim to produce single, relocatable, Python binaries, and I've never seen one without a huge list of caveats. Even yesterday I was patching an open source library that didn't work inside one of these because it had the gaul to use... checks notes, os.path.

> Well, looks like modern mobile phones are not a great hacker's playground, huh?

This sums it up. They are not. The security environment on these devices pretty much ends this before you even get to writing any code, and that's generally a good thing. Phones are appliances for most people. There's a reason why "apps" took off in a way that boxed desktop software never did, and there's a reason why boxed desktop software on Windows did far better than package managers on Linux. Almost everyone wants more a more polished experience. Shipping a Python script running OpenCV to a phone is not going to produce a polished experience.

m_kos
Android devs, are there any good places online where experienced and friendly devs answer questions? (I need some handholding and the advice I got from Reddit usually turned out not quite right.)
drpixie
Strong agree - it's horrible. I can't get past the enormous amount of boilerplate code that's required to do anything - even the proverbial Hello World.
qwerty456127
> Using Python scripting and OpenCV, I had a working cross-compatible script in 10 minutes, for both Linux and Windows.

Which toolkit did you use?

yieldcrv
Android development is pretty bad

but I never had trouble loading in C/C++ libraries with the NDK beyond the debugging issues

gsky
I enjoyed building Android apps using flutter framework but never touched the native though
shrimp_emoji
Mobile is evil. Mobile is false dharma. That's why all the $$$'s in it.
aristofun
Android is a piece of sh.. from developer perspective (and arguably from a user one).

Known fact, take it or leave it :)

To be fair UI development can not be simple in itself.

Because of the exponentially growing state machine => simple Rails style general purpose frameworks are impossible, it will always be a challenging problem.

mikejonasss
Android is crazy bloated, leaved it completely & never look back.
sgammon
Kotlin is a dream. I literally love writing it.
JackYoustra
Try using Expo! I've found it to be much easier than native development on either platform, and its fairly easy to move through if you know web stuff.
seba_dos1
If you think Android app development is crazy, try to work on Android itself.

> Well, looks like modern mobile phones are not a great hacker's playground, huh?

I'm using a GNU/Linux phone and I'm super happy with how playgroundish it can get if I want.

brudgers
Phones are optimized to handle RF. My engineering advice is to build your application with that in mind.

A wireless webcam is the simplest thing that might work. Hosting a video stream on other hardware might be the second simplest thing.

Good luck.

John23832
You should try iOS dev.
b20000
welcome to real software development
Akash_deshmukh
Agrred.Android Studio Takes too much time to start