opus icon indicating copy to clipboard operation
opus copied to clipboard

Android build instructions

Open trampster opened this issue 5 years ago • 3 comments

Would be good if there was instructions for building opus with the android NDK

trampster avatar Mar 28 '20 05:03 trampster

For some context, I'm a c# developer (no experience building native libs) I've created a c# wrapper for opus for my app, which I have used and tested on ubuntu, I was able to build for ubuntu by following the instructions in the readme, however I can't figure out how to build a .so of opus for android. There are some very old instructions online but nothing that matches the latest android ndk.

Prebuilt binaries for android would also suit me.

trampster avatar Mar 28 '20 05:03 trampster

For example I was able to build openssl for android using the following instructions https://proandroiddev.com/tutorial-compile-openssl-to-1-1-1-for-android-application-87137968fee

Something like this would be great.

trampster avatar Mar 29 '20 06:03 trampster

You can probably use cmake (not tested in runtime on android yet) but it builds using the following command.

-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a -DBUILD_SHARED_LIBS=ON -DCMAKE_SYSTEM_NAME=Android -DCMAKE_SYSTEM_VERSION=21 -DCMAKE_ANDROID_NDK=<PATH_TO_SDK>

https://github.com/xnorpx/opus/runs/550531309?check_suite_focus=true

xnorpx avatar Apr 01 '20 00:04 xnorpx