This is a copy-paste of Andrew Kelly's SDL Zig Demo but running on Android. The build is setup so you can also target your native operating system as well.
zig build -Dtarget=x86_64-linux-android
adb install ./zig-out/bin/sdl-zig-demo.apk
zig build -Dandroid=true
adb install ./zig-out/bin/sdl-zig-demo.apk
zig build run
If installing your application fails with something like:
adb: failed to install ./zig-out/bin/sdl2.apk: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Existing package com.zig.sdl2 signatures do not match newer version; ignoring!]
adb uninstall "com.zig.sdl2"
Powershell (app doesn't need to be running)
adb logcat | Select-String com.zig.sdl2:
Bash (app doesn't need running to be running)
adb logcat com.zig.sdl2:D *:S
Bash (app must be running, logs everything by the process including modules)
adb logcat --pid=`adb shell pidof -s com.zig.sdl2`