tuket / bare_apk_zig Goto Github PK
View Code? Open in Web Editor NEWAndroid APK with Zig that does nothing
Android APK with Zig that does nothing
On a MacBookPro11,1
i changed the config
// const jdk_path = "C:/Program Files/Java/jdk-20";
const jdk_path = "/Library/Java/JavaVirtualMachines/openjdk.jdk/Contents/Home";
// const androidSdk_rootPath = "C:/Android";
const androidSdk_rootPath = "/Users/aok/.android";
// const libC_rootPath = try std.fmt.allocPrint(b.allocator, "{s}/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr", .{ndk_path});
const libC_rootPath = try std.fmt.allocPrint(b.allocator, "{s}/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr", .{ndk_path});
$ zig build keystore
$ zig build apk
zig build-lib test Debug arm-linux-android: error: the following command failed with 2 compilation errors:
/usr/local/bin/zig build-lib /Users/aok/Projects/rustdev/dev_work/zigdev/bare_apk_zig/src/main.zig -llog -landroid -lc -fstrip --libc /Users/aok/Projects/rustdev/dev_work/zigdev/bare_apk_zig/zig-cache/o/8446ac6de27122ce88fc2a5032dc94ce/android_libc.conf --cache-dir /Users/aok/Projects/rustdev/dev_work/zigdev/bare_apk_zig/zig-cache --global-cache-dir /Users/aok/.cache/zig --name test -dynamic -target arm-linux-android -mcpu baseline -L /Users/aok/.android/ndk/25.0.8775105/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/lib/arm-linux-androideabi/21 -fPIC --listen=-
Build Summary: 2/10 steps succeeded; 1 failed (disable with --summary none)
apk transitive failure
└─ install generated to test.apk transitive failure
├─ WriteFile test.apk transitive failure
│ └─ run /Users/aok/.android/build-tools/33.0.0/zipalign (test.aligned.apk) transitive failure
│ └─ run /Users/aok/.android/build-tools/33.0.0/aapt (test.unaligned.apk) transitive failure
│ └─ WriteFile lib/armeabi-v7a/libtest.so transitive failure
│ └─ zig build-lib test Debug arm-linux-android 2 errors
└─ run /Users/aok/.android/build-tools/33.0.0/apksigner.sh transitive failure
└─ WriteFile test.apk (+1 more reused dependencies)
error: ld.lld: relocation R_ARM_TLS_LE32 against debug.panic_stage cannot be used with -shared
note: defined in /Users/aok/Projects/rustdev/dev_work/zigdev/bare_apk_zig/zig-cache/o/4683eceb073d710f34ca31daa15ddd6c/libtest.so.o
note: referenced by test
note: /Users/aok/Projects/rustdev/dev_work/zigdev/bare_apk_zig/zig-cache/o/4683eceb073d710f34ca31daa15ddd6c/libtest.so.o:(debug.panicImpl)
error: ld.lld: relocation R_ARM_TLS_LE32 against Thread.LinuxThreadImpl.tls_thread_id cannot be used with -shared
note: defined in /Users/aok/Projects/rustdev/dev_work/zigdev/bare_apk_zig/zig-cache/o/4683eceb073d710f34ca31daa15ddd6c/libtest.so.o
note: referenced by test
note: /Users/aok/Projects/rustdev/dev_work/zigdev/bare_apk_zig/zig-cache/o/4683eceb073d710f34ca31daa15ddd6c/libtest.so.o:(Thread.LinuxThreadImpl.getCurrentId)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.