aws-sdk-cpp: Can't build on Android
What platform/OS
MacOS 10.12.6 Want to build static libs for android platform CMake 3.10.1 AWS commit 59289cf5f08874ed82f03bee586ad9078c765731 (HEAD -> master, tag: 1.3.35)
CMake arguments
cmake ../src/aws-sdk-cpp -DBUILD_SHARED_LIBS=OFF -DTARGET_ARCH=ANDROID -DBUILD_ONLY="core;iam;access-management;cognito-identity;iot;cognito-idp;cognito-sync;identity-management" -DNDK_DIR=/Users/anton.titkov/Library/Android/android-ndk-r16b
CMake output
-- Found Git: /usr/local/bin/git (found version "2.15.1")
-- Building AWS libraries as static objects
-- Android ABI: none specified, defaulting to armeabi-v7a
-- Android toolchain unspecified, defaulting to standalone-clang
-- Android std lib: libc++_shared
-- Android API level: android-21
-- Detected NDK version r16b
-- Could not find an appropriate standalone toolchain. Generating one into /Users/anton.titkov/DevLibs/aws-sdk-cpp/android/toolchains/android/armeabi-v7a-standalone-clang-android-21-libc++_shared-16002
-- Building project version: 1.3.35
CMake Error at cmake/platform/android.toolchain.cmake:311 (message):
Could not get Android native API level. Probably you have specified
invalid level value, or your copy of NDK/toolchain is broken.
Call Stack (most recent call first):
cmake/platform/android.toolchain.cmake:508 (__DETECT_NATIVE_API_LEVEL)
/usr/local/Cellar/cmake/3.10.1/share/cmake/Modules/CMakeDetermineSystem.cmake:94 (include)
CMakeLists.txt:106 (project)
CMake Error at cmake/platform/android.toolchain.cmake:805 (message):
Specified Android native API level 'android-21' is not supported by your
NDK/toolchain.
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.10.1/share/cmake/Modules/CMakeDetermineSystem.cmake:94 (include)
CMakeLists.txt:106 (project)
-- The CXX compiler identification is Clang 5.0.300080
-- Check for working CXX compiler: /Users/anton.titkov/DevLibs/aws-sdk-cpp/android/toolchains/android/armeabi-v7a-standalone-clang-android-21-libc++_shared-16002/bin/clang50++
CMake Error at /Users/anton.titkov/DevLibs/aws-sdk-cpp/src/aws-sdk-cpp/cmake/platform/android.toolchain.cmake:311 (message):
Could not get Android native API level. Probably you have specified
invalid level value, or your copy of NDK/toolchain is broken.
Call Stack (most recent call first):
/Users/anton.titkov/DevLibs/aws-sdk-cpp/src/aws-sdk-cpp/cmake/platform/android.toolchain.cmake:508 (__DETECT_NATIVE_API_LEVEL)
/Users/anton.titkov/DevLibs/aws-sdk-cpp/android/CMakeFiles/3.10.1/CMakeSystem.cmake:6 (include)
/Users/anton.titkov/DevLibs/aws-sdk-cpp/android/CMakeFiles/CMakeTmp/CMakeLists.txt:3 (project)
CMake Error at /Users/anton.titkov/DevLibs/aws-sdk-cpp/src/aws-sdk-cpp/cmake/platform/android.toolchain.cmake:805 (message):
Specified Android native API level 'android-21' is not supported by your
NDK/toolchain.
Call Stack (most recent call first):
/Users/anton.titkov/DevLibs/aws-sdk-cpp/android/CMakeFiles/3.10.1/CMakeSystem.cmake:6 (include)
/Users/anton.titkov/DevLibs/aws-sdk-cpp/android/CMakeFiles/CMakeTmp/CMakeLists.txt:3 (project)
CMake Error at /usr/local/Cellar/cmake/3.10.1/share/cmake/Modules/CMakeTestCXXCompiler.cmake:30 (try_compile):
Failed to configure test project build system.
Call Stack (most recent call first):
CMakeLists.txt:106 (project)
-- Configuring incomplete, errors occurred!
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 16 (8 by maintainers)
Hi, thanks for reporting this problem. Currently the default android.toolchain.cmake works well for NDK with version <= 12b. For NDK with version larger than 12b, we have added it to our backlog.