I got a .so file from Android aar package with x86 , x86_64, armv7 etc.
Would it be possible for me to call the function in the .so file?
What I have been tried
created a main.c
#include <stdio.h>
int main() {
printf("Hello World!\n");
printf("%d", Java_com_scaf_android_client_CodecUtils_stringFromJNI());
return 0;
}
execute
$ gcc -o main -lLockCore main.c
and I faced this error
main.c:4:15: warning: implicit declaration of function ‘Java_com_scaf_android_client_CodecUtils_stringFromJNI’ [-Wimplicit-function-declaration]
printf("%d", Java_com_scaf_android_client_CodecUtils_stringFromJNI());
^
/tmp/cc9vP9rb.o: In function `main':
main.c:(.text+0x14): undefined reference to `Java_com_scaf_android_client_CodecUtils_stringFromJNI'
collect2: error: ld returned 1 exit status
