Android libraries do not build

Hi all,

I downloaded the SDK for Android, and I tried to build the demo_loadBalancing project
I got the following error

cxx-stl/gnu-libstdc++/4.8/include/atomic:167:7: error: function 'std::atomic<_Tp>::atomic() [with _Tp = ExitGames::Common::Helpers::Thread::ID]' defaulted on its first declaration with an exception-specification that differs from the implicit declaration 'std::atomic::atomic()'
atomic() noexcept = default;

Which NDK version should I use to build your libraries?

Also, can I set the APP_PLATFORM=android-25 or only android-8?

Thank you


  • Vasilis
    edited October 2019
    I was able to build it by downloading NDK-17r version, and setting the APP_STL := gnustl_static
    I searched this forum for similar issues, and I found that APP_STL := c++_static and not to gnustl_static
    Am I missing something here?

    Thank you
  • Hi @Vasilis.

    Make sure to link against the Photon libs with the "_libc++" postfix in their names when using the clang standard lib (APP_STL := c++_static) in your app, and against the ones without it, when using the GCC standard lib (APP_STL := gnustl_static).

    Google has dropped support for the GNU STL from NDK 18 onwards. So if you need to link against the GNU STL because of third party requirements (i.e. Unreal Engine and older versions of Cocos2d-x require you to do that when using them on Android), then you are restricted to NDK 17 or older.

    Please see for more information.

    Also, can I set the APP_PLATFORM=android-25 or only android-8?

    Yes, that should be possible.
  • Hi @Kaiserludi ,

    the problem with the Android is that it was not compiling. But, after I did the change that I wrote above, it did compile.