Open Murtowski opened 6 years ago
Hey, did you figure it out?
probably i had to remove NDK from sdk manager, don't remember for sure.
downgrade to ndk-r16b worked for me
Facing similar Build error while using Android Studio on Mac OS X with Latest NDK Revision 18c and NDK Revision 15c
Library/Android/sdk/cmake/3.6.4111459/bin/cmake with arguments {--build /Users/AICamera/app/.externalNativeBuild/cmake/debug/armeabi-v7a --target native-lib} [1/4] Building C object CMakeFiles/cpufeatures.dir/Users//Library/Android/sdk/ndk-bundle/sources/android/cpufeatures/cpu-features.c.o [2/4] Linking C static library libcpufeatures.a [3/4] Building CXX object CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o [4/4] Linking CXX shared library ../../../../build/intermediates/cmake/debug/obj/armeabi-v7a/libnative-lib.so FAILED: : && /Users//Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=armv7-none-linux-androideabi --gcc-toolchain=/Users/mayjain/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 --sysroot=/Users//Library/Android/sdk/ndk-bundle/sysroot -fPIC -isystem /Users/mayjain/Library/Android/sdk/ndk-bundle/sysroot/usr/include/arm-linux-androideabi -D__ANDROID_API__=22 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -std=c++11 -frtti -fexceptions -std=c++11 -O0 -fno-limit-debug-info -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -nostdlib++ --sysroot /Users/mayjain/Library/Android/sdk/ndk-bundle/platforms/android-22/arch-arm -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--fix-cortex-a8 -Wl,--exclude-libs,libunwind.a -L/Users/mayjain/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,libnative-lib.so -o ../../../../build/intermediates/cmake/debug/obj/armeabi-v7a/libnative-lib.so CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o -Wl,--whole-archive ../../../../src/main/jniLibs/armeabi-v7a/libCaffe2_CPU.a -Wl,--no-whole-archive ../../../../src/main/jniLibs/armeabi-v7a/libCAFFE2_NNPACK.a ../../../../src/main/jniLibs/armeabi-v7a/libCAFFE2_PTHREADPOOL.a ../../../../src/main/jniLibs/armeabi-v7a/libglog.so ../../../../src/main/jniLibs/armeabi-v7a/libprotobuf.a libcpufeatures.a -llog -landroid -ldl -latomic -lm "**/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++_static.a" "/Users//Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++abi.a" "/Users//Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libunwind.a" "-ldl" && : clang++: error: unknown argument: '-nostdlib++' ninja: build stopped: subcommand failed.
solved all build/ compile errors by reverting to NDK 13b and using Android Studio 3.0.1
Hello I can build apk. While compiling the error is: