# Building Android with .so

**URL:** <https://forum.defold.com/t/building-android-with-so/37080>\
**Category:** Questions\
**Created:** [December 8, 2018, 8:43am UTC](https://forum.defold.com/t/building-android-with-so/37080 "2018-12-08T08:43:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gerrykwok7](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/gerrykwok7/32/12764_2.png) [@gerrykwok7](https://forum.defold.com/u/gerrykwok7)\
**Post date:** [December 8, 2018, 8:43am UTC](https://forum.defold.com/t/building-android-with-so/37080/1 "2018-12-08T08:43:25Z")

</div>

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:

 ![image](https://forum-defold-uploads.b-cdn.net/original/2X/8/8320c3ee0747fcc1b1218ac44c77fb6b1bce8e44.png)

---

<div class="post-metadata">

**Author:** ![selimanac](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/selimanac/32/6397_2.png) [@selimanac](https://forum.defold.com/u/selimanac)\
**Post date:** [December 8, 2018, 9:07am UTC](https://forum.defold.com/t/building-android-with-so/37080/2 "2018-12-08T09:07:35Z")

</div>

I’m not familiar with Crasheye but looks like it is a [dynamic lib](http://www.testplus.us/docs/crasheye/androidndkuse#overview-android-ndk) 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](http://www.testplus.us/docs/crasheye/androidsdkuse#overview-android-sdk)

---

<div class="post-metadata">

**Author:** ![gerrykwok7](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/gerrykwok7/32/12764_2.png) [@gerrykwok7](https://forum.defold.com/u/gerrykwok7)\
**Post date:** [December 8, 2018, 9:11am UTC](https://forum.defold.com/t/building-android-with-so/37080/3 "2018-12-08T09:11:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dapetcu21](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/dapetcu21/32/25120_2.png) [@dapetcu21](https://forum.defold.com/u/dapetcu21)\
**Post date:** [December 8, 2018, 10:06am UTC](https://forum.defold.com/t/building-android-with-so/37080/4 "2018-12-08T10:06:16Z")

</div>

I think you need to add the library to the [`dynamicLibs` field](https://forum.defold.com/t/defold-1-2-141-has-been-released/33996) 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.

---

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [December 8, 2018, 11:00am UTC](https://forum.defold.com/t/building-android-with-so/37080/5 "2018-12-08T11:00:47Z")

</div>

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