I want to develop an Android Application that uses the Sony Camera Remote SDK. I’ve downloaded the ARMv8 SDK. However, I’m unsure how to include the .so libraries and .h files correctly. I would like to call the library from a C++ Wrapper rather than directly from Kotlin/Java.
I’m working with AndroidStudio Jellyfish and the application is supposed to be built for android SDK version 34.
Currently, I have placed the header files inside the cpp folder in app/src/main/ and the .so files in app/jniLibs/arm64-v8a/. I’ve tried to put the .so files in the same hierarchy as in the download (with some .so files in subfolders) and with a flattened hierarchy (i.e. all .so files (including those from subfolders) directly inside app/jniLibs/arm64-v8a/). However in both cases, when calling a function specified in the header files (e.g. SDK::GetSDKVersion()), I get the following error:
ld.lld: error: undefined symbol: GetSDKVersion
When I simply implement the function GetSDKVersion inside the header file and return a constant value, it works. So probably I am including the .so files incorrectly, right? Do I have to include them in the build.gradle.kts? Or do I miss something else?
Thanks in advance!
user25525344 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.