Live data from Hacker News

Rawdrawandroid – Build Android apps without any Java, in C and Make

github.com

51–60 of 157 posts

Re: Rawdrawandroid – Build Android apps without any Java, in C and Make

#51
post #42
post #31

Earlier quoted context omitted.

Quite a few game engines work and don't use Make.

Game engines that we can readily use to code for Android outside the Java and web frameworks? Which ones exactly?

Unreal and Unity both target iOS and Android and are not "java" or "web frameworks"

Re: Rawdrawandroid – Build Android apps without any Java, in C and Make

#52

Earlier quoted context omitted.

Same thing with XCode. I'd love a mobile app development pipeline that lets me never use either Android Studio or XCode. Let me drive everything with scripts and/or VSCode extensions.

Isn't flutter (especially including the flutter rust bridge), achieving that? You do need Android Studio and XCode installed on your machine but you don't have to interact with them directly.

As someone interested in flutter, when do you have to use XCode and Android Studio?

Re: Rawdrawandroid – Build Android apps without any Java, in C and Make

#53
post #44

Earlier quoted context omitted.

That'd require some form of collaborative behavior across internal organizations, and real planning! I wake up every morning and thank God that Flutter exists. I can target Android without dealing with building on years and years of sloppy work. Sunk-cost fallacy x politics leads to this never being fixed. I don't think Google can fix it, unless hardware fails entirely. There's been years-long politics that culminate…

>I don't think Google can fix it Can they eventually throw away Android and replace it with Fuchsia? In the reporting about Fuchsia that I read ages ago, it sounded like it was intended to be an Android replacement but, looking into it again just now, it seems more like an embedded OS for other non-smartphone hardware -- maybe with some (aspirational?) claims of utility on smartphones and tablets.

Fuchsia has components for running APKs (Android Runner) and Linux binaries (Starnix), but that probably isn't what you meant.

The problem with replacing a UI toolkit - any toolkit - is that any change to the toolkit requires modification of all software, including third-party software. Typically, when an OS wants to provide a new toolkit, they wrap the existing toolkit in new code. For example, on macOS, UIKit wraps AppKit, and on all Apple platforms SwiftUI is a wrapper around AppKit and UIKit (depending on platform). On Windows, every UI toolkit ultimately is creating "windows" as they are understood by USER[0], which creates corresponding objects in CSRSS and/or the NT kernel, which can then be used to draw on or attach to a GPU. The lowest level UI abstraction either OS provides is the objects supported by their oldest toolkit, and the lowest level programming language you can write apps in is whatever can call it.

Linux is a bit different, because it inherits its windowing model from X11. X shipped with no default toolkit and a stable window server protocol that apps could program against directly, in an era where most GUI OSes[1] didn't have 'servers' or 'protocols'. You populated resource files and called the relevant function calls to make things happen, and those function calls became sacrosanct. Even Windows NT couldn't escape this; it still used USER despite USER being years older than NT.

The best you can do is shim the library - write something more lower level than the old junk and then rewrite the old library in terms of the new one. This is what Xwayland does to make X apps work on Wayland; and it's what Apple did (mostly) with Carbon to give a transition path to Mac OS 8/9 apps on OS X. Google could, say, ship a new Android toolkit that doesn't use Java bindings, and then make Android's Java toolkit a shim to the new native toolkit. However, this still means you have to keep the shim around forever, at least unless you want to start having flag dates and cut-offs. For context, Apple didn't kill Carbon until macOS 10.15 Catalina, and if they hadn't refused to ship Carbon on 64-bit Intel, it probably would still be in macOS today.

[0] An interesting consequence of this is that disabling "legacy input" in games turns off the ability to move the application window since all that code is intimately coupled to every app that has to open a top-level (i.e. not a widget) window.

[1] At the time that would be XEROX Star, the Lisa, and the Macintosh

[2] This is also why Apple will never, ever ship an iPad that can run macOS software in any capacity. Even if they were forced to allow root access and everything else macOS can do. The entire point of the iPad is to force software developers to rewrite their apps for touch, and I suspect their original intent was for the Macintosh to go away like the Apple ][ did.

Re: Rawdrawandroid – Build Android apps without any Java, in C and Make

#55
post #5
post #2

This is pretty great. The biggest reason I hate doing android development is the java (and to a lesser extent, kotlin) "ecosystem" is a pain. Java is a sucky language to write; Kotlin is less bad, but the whole build tooling/package management/IDE mania mess is still a hassle to use. So thanks to the author.

I can tolerate Java and Kotlin, but the tooling is just awful *. I've stopped counting how many times I came back to an Android project after only a few months, only to have Android Studio force me to update Gradle and dependencies and whatnot, and break everything. * Of course one could blame me for not learning the ins and outs of the build system!

As an Android dev who use Android Studio for daily work, I confirm updating Gradle may break your projects, well depends on the libraries you used.

In other cases, updating Gradle won't give any problem. You can build the APK fine. Debugging the build system is annoying :D

Re: Rawdrawandroid – Build Android apps without any Java, in C and Make

#56
post #5

Earlier quoted context omitted.

I can tolerate Java and Kotlin, but the tooling is just awful *. I've stopped counting how many times I came back to an Android project after only a few months, only to have Android Studio force me to update Gradle and dependencies and whatnot, and break everything. * Of course one could blame me for not learning the ins and outs of the build system!

Same thing with XCode. I'd love a mobile app development pipeline that lets me never use either Android Studio or XCode. Let me drive everything with scripts and/or VSCode extensions.

Try give a look at kraken: https://github.com/sal0max/kraken

It's a native Android app (Kotlin) which isn't developed using Android Studio. Gradle only.

Re: Rawdrawandroid – Build Android apps without any Java, in C and Make

#57
post #2

This is pretty great. The biggest reason I hate doing android development is the java (and to a lesser extent, kotlin) "ecosystem" is a pain. Java is a sucky language to write; Kotlin is less bad, but the whole build tooling/package management/IDE mania mess is still a hassle to use. So thanks to the author.

[deleted]

Re: Rawdrawandroid – Build Android apps without any Java, in C and Make

#58

Earlier quoted context omitted.

Isn't flutter (especially including the flutter rust bridge), achieving that? You do need Android Studio and XCode installed on your machine but you don't have to interact with them directly.

As someone interested in flutter, when do you have to use XCode and Android Studio?

The only times I’ve had to use Xcode for my flutter app is configuring some things related to signing and distribution. There hasn’t been anything that required Android Studio except for setting up emulators.

Re: Rawdrawandroid – Build Android apps without any Java, in C and Make

#59
post #42
post #31

Earlier quoted context omitted.

Quite a few game engines work and don't use Make.

Game engines that we can readily use to code for Android outside the Java and web frameworks? Which ones exactly?

At least Unreal, Unity and Godot but most likely more target Android and iOS as well.

Re: Rawdrawandroid – Build Android apps without any Java, in C and Make

#60
Looks like you still have to start by installing Android Studio, which seems excessive. Is there a way to just download an Android SDK?

Looking briefly at the makefile, I think they might have avoided Gradle, though it calls other tools written in Java.

I'd love to see a way to build a Flutter app without Gradle.

Post reply on HN