# Android build on Linux

**URL:** <https://discourse.libcinder.org/t/android-build-on-linux/1515>\
**Category:** Using Cinder\
**Created:** [May 30, 2019, 8:55pm UTC](https://discourse.libcinder.org/t/android-build-on-linux/1515 "2019-05-30T20:55:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gabor\_papp](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/gabor_papp/32/769_2.png) [@gabor\_papp](https://discourse.libcinder.org/u/gabor_papp)\
**Post date:** [May 30, 2019, 8:55pm UTC](https://discourse.libcinder.org/t/android-build-on-linux/1515/1 "2019-05-30T20:55:05Z")

</div>

Hello,

I am trying to set up an android build on linux. Earlier I successfully used it in macOS, but on linux it seems much more complicated.  
I installed Android Studio 3.4.1, Sdk 19, Ndk. Also downloaded jdk1.8.0\_211.  
It seems that the build was made for gcc-4.9, but now only clang is in the toolchain.  
I run the build like this:

```auto
export NDK_ROOT=~/Android/Sdk/ndk-bundle; ./fullbuild-armeabi-v7a -clang -v -n $NDK_ROOT

```

Received many errors about missing headers, although the `${NDK_ROOT}/sources/cxx-stl/llvm-libc++/include` path is set and exists.

Full list of errors:  
[https://pastebin.com/6damGHwN](https://pastebin.com/6damGHwN)

Has anyone gotten this to work? Any help would be greatly appreciated.

-Gabor

---

<div class="post-metadata">

**Author:** ![gabor\_papp](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/gabor_papp/32/769_2.png) [@gabor\_papp](https://discourse.libcinder.org/u/gabor_papp)\
**Post date:** [June 15, 2019, 6:15pm UTC](https://discourse.libcinder.org/t/android-build-on-linux/1515/2 "2019-06-15T18:15:53Z")

</div>

I found a workaround by installing NDK 15c from [https://developer.android.com/ndk/downloads/older\_releases.html](https://developer.android.com/ndk/downloads/older_releases.html)  
This NDK still contains the toolchain Cinder was prepared to build with.

-Gabor

---

<div class="post-metadata">

**Author:** ![ShamylZakariya](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/shamylzakariya/32/341_2.png) [@ShamylZakariya](https://discourse.libcinder.org/u/ShamylZakariya)\
**Post date:** [June 21, 2019, 10:04pm UTC](https://discourse.libcinder.org/t/android-build-on-linux/1515/3 "2019-06-21T22:04:08Z")

</div>

Can you point to me how you got the Android build working on macOS? All the docs I’ve found seem outdated.

---

<div class="post-metadata">

**Author:** ![gabor\_papp](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/gabor_papp/32/769_2.png) [@gabor\_papp](https://discourse.libcinder.org/u/gabor_papp)\
**Post date:** [June 22, 2019, 6:04am UTC](https://discourse.libcinder.org/t/android-build-on-linux/1515/4 "2019-06-22T06:04:19Z")

</div>

I’m not familiar with android development, so I tried to make it work with old tools. I installed sdk 19 and 21, and ndk 15c. You also have to change some paths. These are the changes that worked for me. You don’t have to apply the ones in videoplayer.java unless you would like to play videos from files instead of assets. [https://gist.github.com/gaborpapp/1b0a5d3a595126c0a3b7dac6eb8d17f6](https://gist.github.com/gaborpapp/1b0a5d3a595126c0a3b7dac6eb8d17f6)

-Gabor
