Run as an Android application #1757
furkanturkmn
started this conversation in
General
Replies: 1 comment
-
Hello, my suggestion is to compile the server without cgo, embed it into the android app as a static file and start it by using Java's |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was trying to integrate the server into an android app by generating a library and starting the server through JNI call which is exposed over cgo. Inorder to build the server as a library I was using; CGO_ENABLED=1 GOOS=android GOARCH=arm64 CC=/home/dev/Android-SDK/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android33-clang go build -buildmode=c-shared -o libfoo.so main.go as a result the server gets called but somehow it crashes and the android subsystem repeatedly tries to reinitialize the server library. Do you have any clue what the problem might be?
Beta Was this translation helpful? Give feedback.
All reactions