ggwave-java icon indicating copy to clipboard operation
ggwave-java copied to clipboard

is the library loaded, e.g. System.loadLibrary?

Open risharde opened this issue 1 year ago • 2 comments

Hi, so I'm trying to get a working prototype going so I built a new Android app with the lastest Android Studio and tried to painstakingly immitate the structure found from this example but got this:

java.lang.UnsatisfiedLinkError: No implementation found for void com.risharde.callmessenger.MainActivity.initNative() (tried Java_com_risharde_callmessenger_MainActivity_initNative and Java_com_risharde_callmessenger_MainActivity_initNative__) - is the library loaded, e.g. System.loadLibrary?

This is on Windows by the way. I wish I could somehow give you more information but even the example project does not build successfully on the latest Android Studio

Is it possible that this project will be updated to work with the latest Android Studio?

risharde avatar May 06 '24 20:05 risharde

This is the only error I see but I'm not sure if it's related. C/C++: CMake Warning (dev) in CMakeLists.txt: C/C++: No project() command is present. The top-level CMakeLists.txt file must C/C++: contain a literal, direct call to the project() command. Add a line of C/C++: code such as C/C++: project(ProjectName) C/C++: near the top of the file, but after cmake_minimum_required(). C/C++: CMake is pretending there is a "project(Project)" command on the first C/C++: line. C/C++: This warning is for project developers. Use -Wno-dev to suppress it.

risharde avatar May 06 '24 20:05 risharde

A few months ago i made it work, as far as my documentation shows, i just replaced the src/main/cpp/ggwave submodule with the specific commit ef85be08cee3e11dcf2a31a58e3577e64ea836e1 , afterwards the android build should work afaik

EDIT: I just noticed it is the same commit as mentioned in the submodule in this repo. As your error tells you you probably skipped the System.loadLibrary call within the main activity:
https://github.com/ggerganov/ggwave-java/blob/211ae947fda7307aa318cd430216bcabd9b8d071/app/src/main/java/com/example/ggwave/MainActivity.java#L72 on my site everything is still working as expected, creating a mvp / module would take some time, not sure if i will spend time on that in the near future

Hatzen avatar May 21 '24 22:05 Hatzen