I ran the following commands -
cmake -G "NMake Makefiles" -DTARGET_ARCH=ANDROID -DNDK_DIR=d:/work/Android/android-ndk-r17b -DANDROID_ABI=armeabi-v7a -DANDROID_TOOLCHAIN_NAME="standalone-clang" -DANDROID_NATIVE_API_LEVEL=21 ..
on my windows 10.
I received the following errors and simply could not get pass the invalid api level error. I tried ndk r16b, 14b and various other options in the command line. For the past 10 hours. Appreciate any insights and pointers please. Thank you.
Marc
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.18.0.windows.1")
-- Building AWS libraries as shared objects
-- Android ABI: armeabi-v7a
-- Android std lib: libc++_shared
-- Android API level: 21
-- Detected NDK version r17b
-- Could not find an appropriate standalone toolchain. Generating one into D:/work/AWS/aws-sdk-cpp/sdk_build_Android/toolchains/android/armeabi-v7a-standalone-clang-21-libc++_shared-17002
-- Building project version: 1.5.20
CMake Error at cmake/platform/android.toolchain.cmake:310 (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:507 (__DETECT_NATIVE_API_LEVEL)
C:/Program Files/CMake/share/cmake-3.12/Modules/CMakeDetermineSystem.cmake:94 (include)
CMakeLists.txt:109 (project)
CMake Error at cmake/platform/android.toolchain.cmake:804 (message):
Specified Android native API level 'android-21' is not supported by your
NDK/toolchain.
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.12/Modules/CMakeDetermineSystem.cmake:94 (include)
CMakeLists.txt:109 (project)
-- The CXX compiler identification is Clang 6.0.2
-- Check for working CXX compiler: D:/work/AWS/aws-sdk-cpp/sdk_build_Android/toolchains/android/armeabi-v7a-standalone-clang-21-libc++_shared-17002/bin/clang++.cmd
CMake Error at D:/work/AWS/aws-sdk-cpp/cmake/platform/android.toolchain.cmake:310 (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):
D:/work/AWS/aws-sdk-cpp/cmake/platform/android.toolchain.cmake:507 (__DETECT_NATIVE_API_LEVEL)
D:/work/AWS/aws-sdk-cpp/sdk_build_Android/CMakeFiles/3.12.1/CMakeSystem.cmake:6 (include)
D:/work/AWS/aws-sdk-cpp/sdk_build_Android/CMakeFiles/CMakeTmp/CMakeLists.txt:3 (project)
CMake Error at D:/work/AWS/aws-sdk-cpp/cmake/platform/android.toolchain.cmake:804 (message):
Specified Android native API level 'android-21' is not supported by your
NDK/toolchain.
Call Stack (most recent call first):
D:/work/AWS/aws-sdk-cpp/sdk_build_Android/CMakeFiles/3.12.1/CMakeSystem.cmake:6 (include)
D:/work/AWS/aws-sdk-cpp/sdk_build_Android/CMakeFiles/CMakeTmp/CMakeLists.txt:3 (project)
CMake Error at C:/Program Files/CMake/share/cmake-3.12/Modules/CMakeTestCXXCompiler.cmake:30 (try_compile):
Failed to configure test project build system.
Call Stack (most recent call first):
CMakeLists.txt:109 (project)
-- Configuring incomplete, errors occurred!
See also "D:/work/AWS/aws-sdk-cpp/sdk_build_Android/CMakeFiles/CMakeOutput.log".
Thanks for reporting this problem. Currently, the android.toolchain.cmake is only tuned to work with NDK-12b. The work to support newer NDKs is in our backlog.
I ran the following commands - cmake -G "NMake Makefiles" -DTARGET_ARCH=ANDROID -DNDK_DIR=d:/work/Android/android-ndk-r17b -DANDROID_ABI=armeabi-v7a -DANDROID_TOOLCHAIN_NAME="standalone-clang" -DANDROID_NATIVE_API_LEVEL=21 ..
on my windows 10.
I received the following errors and simply could not get pass the invalid api level error. I tried ndk r16b, 14b and various other options in the command line. For the past 10 hours. Appreciate any insights and pointers please. Thank you. Marc
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.18.0.windows.1") -- Building AWS libraries as shared objects -- Android ABI: armeabi-v7a -- Android std lib: libc++_shared -- Android API level: 21 -- Detected NDK version r17b -- Could not find an appropriate standalone toolchain. Generating one into D:/work/AWS/aws-sdk-cpp/sdk_build_Android/toolchains/android/armeabi-v7a-standalone-clang-21-libc++_shared-17002 -- Building project version: 1.5.20 CMake Error at cmake/platform/android.toolchain.cmake:310 (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:507 (__DETECT_NATIVE_API_LEVEL) C:/Program Files/CMake/share/cmake-3.12/Modules/CMakeDetermineSystem.cmake:94 (include) CMakeLists.txt:109 (project)
CMake Error at cmake/platform/android.toolchain.cmake:804 (message): Specified Android native API level 'android-21' is not supported by your NDK/toolchain. Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.12/Modules/CMakeDetermineSystem.cmake:94 (include) CMakeLists.txt:109 (project)
-- The CXX compiler identification is Clang 6.0.2 -- Check for working CXX compiler: D:/work/AWS/aws-sdk-cpp/sdk_build_Android/toolchains/android/armeabi-v7a-standalone-clang-21-libc++_shared-17002/bin/clang++.cmd CMake Error at D:/work/AWS/aws-sdk-cpp/cmake/platform/android.toolchain.cmake:310 (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): D:/work/AWS/aws-sdk-cpp/cmake/platform/android.toolchain.cmake:507 (__DETECT_NATIVE_API_LEVEL) D:/work/AWS/aws-sdk-cpp/sdk_build_Android/CMakeFiles/3.12.1/CMakeSystem.cmake:6 (include) D:/work/AWS/aws-sdk-cpp/sdk_build_Android/CMakeFiles/CMakeTmp/CMakeLists.txt:3 (project)
CMake Error at D:/work/AWS/aws-sdk-cpp/cmake/platform/android.toolchain.cmake:804 (message): Specified Android native API level 'android-21' is not supported by your NDK/toolchain. Call Stack (most recent call first): D:/work/AWS/aws-sdk-cpp/sdk_build_Android/CMakeFiles/3.12.1/CMakeSystem.cmake:6 (include) D:/work/AWS/aws-sdk-cpp/sdk_build_Android/CMakeFiles/CMakeTmp/CMakeLists.txt:3 (project)
CMake Error at C:/Program Files/CMake/share/cmake-3.12/Modules/CMakeTestCXXCompiler.cmake:30 (try_compile): Failed to configure test project build system. Call Stack (most recent call first): CMakeLists.txt:109 (project)
-- Configuring incomplete, errors occurred! See also "D:/work/AWS/aws-sdk-cpp/sdk_build_Android/CMakeFiles/CMakeOutput.log".