I’m trying to build my app into an APK using gradlew assemble
, and getting the following error:
linking libjuce_jni.so failed.
/Users/adamelemental/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libcxx/include/atomic:840: error: undefined reference to '__atomic_load_1'
/Users/adamelemental/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libcxx/include/atomic:834: error: undefined reference to '__atomic_store_1'
/Users/adamelemental/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libcxx/include/atomic:840: error: undefined reference to '__atomic_load_4'
/Users/adamelemental/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libcxx/include/atomic:834: error: undefined reference to '__atomic_store_4'
/Users/adamelemental/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libcxx/include/atomic:834: error: undefined reference to '__atomic_store_1'
/Users/adamelemental/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libcxx/include/atomic:840: error: undefined reference to '__atomic_load_4'
/Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++/libcxx/include/atomic:922: error: undefined reference to '__atomic_fetch_add_4'
/Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_handlers.cpp:112: error: undefined reference to '__atomic_exchange_4'
/Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_default_handlers.cpp:106: error: undefined reference to '__atomic_exchange_4'
/Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/cxa_default_handlers.cpp:117: error: undefined reference to '__atomic_exchange_4'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
Its the same whether I do assembleDebug or assembleRelease. Any ideas? Is there a compiler flag missing?
BTW it works fine in AndroidStudio. I have an Android-related build issue with missing asset links which I’m trying to solve using gradlew
.