I'm trying to build the .so file but I don't know how to fix these issues.
First issue:
I think the ndk library is missed the file "atomics.h" so I copy it from some source like this into ndk_path/platforms/android-x/arch-arm/usr/include/sys
I'm afraid I've always said that I'm not even going to attempt doing android builds on Windows myself - the whole build process is messy enough on unix platforms, for which it's designed! I know that other people have got things going on Windows though, so hopefully someone can give you a tip..
I use OSX myself, but I'm sure linux will be fine.
It's just Windows where expecting a posix-based build system to run without hitches seems a little optimistic! I'm sure lots of people use it though...
I have been having a similar problem! I don't have a solution but maybe some more specifics will help. I am trying to compile a static library for Android at both 32 and 64 bits. I am able to compile fine using the 32-bit Andoid NDK, but I get the error you describe (also shown below) when I use the 64-bit NDK on Windows 7 or OSX. I'm pretty new to Android, but perhaps this has something to do with 64-bit JUCE support?? Anybody? Thoughts?
I fixed the problem and it has to do with some updates in the Android L platform that is only available in the 64-bit Android NDK r-10.
The NDK has dropped atomics.h for the Android L platform in favor of <stdatomic.h> (source: https://code.google.com/p/android/issues/detail?id=73744). So you can copy atomics.h from the 32-bit NDK into your ndk-r10\platforms\Android-L\<every arch you want to support>\usr\include\sys\
Also for NDK-r10, "the sys/timeb.h header has been removed in the next platform version (currently available in NDK r10 in the "L preview" release), since this header and the ftime function have been removed from the POSIX 2008 specification." (source: https://rbcommons.com/s/OpenH264/r/683/). So you can copy timeb.h from the 32-bit NDK into the same place as atomics.h, mentioned above.
That worked for me! It's a bit combersome but I'm guessing it will be fixed eventually on the JUCE side. It must suck constantly having to update the code base to work on all the changing SDKs, platforms, etc. God speed man.
Now I'm going to try it for 64-bit iOS 7.1. Fingers crossed.
I managed to compile successfully for Android L by doing the following:
in juce_StandardHeader.h - changed the include for <sys/atomics.h> to <stdatomic.h>
in juce_core.cpp - moved the include for <sys/timeb.h> inside the "#if ! JUCE_ANDROID" statement
However the build failed due to the requirement for Java 7 (major version 51 is newer than 50). Rather than try and solve this I just re-targeted to Android 4.4.