Building Android with .so

I write an extension which will compile with a third party .so file in android.I put the .so to lib/armv7-android folder, but it encounter a build error:

I’m not familiar with Crasheye but looks like it is a dynamic lib which require jar file in lib folder. As far as I know Defold doesn’t support dynamic libs. Maybe you can use this one: http://www.testplus.us/docs/crasheye/androidsdkuse#overview-android-sdk

Does defold really don’t support dynamic libs?Many third party android lib or sdk has dynamic libs.

I think you need to add the library to the dynamicLibs field in your extension manifest to be able to link against it. Otherwise, you might still be able to use the library with dlopen() / dlsym(), but that’s a hassle. Also, you’ll need to place the same shared library in the res/armv7-android/lib/armeabi-v7a/ directory, so that it’s bundled in the APK.

1 Like

Yes, currently, the usage of .so files isn’t great.
We have a ticket for it, but other extension related things have taken priority.