As of 2024-09-19, this is a thrown together, very quick copy-paste of the minimal example from the original ZigAndroidTemplate repository.
zig build run # Native
zig build run -Dandroid # Androidzig build -Dtarget=x86_64-linux-android
adb install ./zig-out/bin/minimal.apk
adb shell am start -S -W -n com.zig.minimal/android.app.NativeActivityzig build -Dandroid
adb install ./zig-out/bin/minimal.apkIf installing your application fails with something like:
adb: failed to install ./zig-out/bin/minimal.apk: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Existing package com.zig.minimal signatures do not match newer version; ignoring!]
adb uninstall "com.zig.minimal"Powershell (app doesn't need to be running)
adb logcat | Select-String com.zig.minimal:Bash (app doesn't need running to be running)
adb logcat com.zig.minimal:D *:SBash (app must be running, logs everything by the process including modules)
adb logcat --pid=`adb shell pidof -s com.zig.minimal`