Skip to content

Android ndk build failed " is not able to compile a simple test" while executing this Android code in Android studio, Windows #3

Description

@aneesu401

Build command failed.
Error while executing process E:\adt-bundle-windows-x86_64-20140702\adt-bundle-windows-x86_64-20140702\sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {-HE:\Android\ndk\CppAndroidIosExample-master\Android\app -BE:\Android\ndk\CppAndroidIosExample-master\Android\app.externalNativeBuild\cmake\debug\armeabi-v7a -DANDROID_ABI=armeabi-v7a -DANDROID_PLATFORM=android-16 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=E:\Android\ndk\CppAndroidIosExample-master\Android\app\build\intermediates\cmake\debug\obj\armeabi-v7a -DCMAKE_BUILD_TYPE=Debug -DANDROID_NDK=E:\adt-bundle-windows-x86_64-20140702\adt-bundle-windows-x86_64-20140702\sdk\ndk\21.3.6528147 -DCMAKE_CXX_FLAGS=-std=c++14 -DCMAKE_TOOLCHAIN_FILE=E:\adt-bundle-windows-x86_64-20140702\adt-bundle-windows-x86_64-20140702\sdk\ndk\21.3.6528147\build\cmake\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=E:\adt-bundle-windows-x86_64-20140702\adt-bundle-windows-x86_64-20140702\sdk\cmake\3.6.4111459\bin\ninja.exe -GAndroid Gradle - Ninja}
-- Check for working C compiler: E:/adt-bundle-windows-x86_64-20140702/adt-bundle-windows-x86_64-20140702/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
-- Check for working C compiler: E:/adt-bundle-windows-x86_64-20140702/adt-bundle-windows-x86_64-20140702/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- broken
CMake Error at E:/adt-bundle-windows-x86_64-20140702/adt-bundle-windows-x86_64-20140702/sdk/cmake/3.6.4111459/share/cmake-3.6/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler
"E:/adt-bundle-windows-x86_64-20140702/adt-bundle-windows-x86_64-20140702/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe"
is not able to compile a simple test program.

It fails with the following output:

Change Dir: E:/Android/ndk/CppAndroidIosExample-master/Android/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/CMakeTmp

Run Build
Command:"E:\adt-bundle-windows-x86_64-20140702\adt-bundle-windows-x86_64-20140702\sdk\cmake\3.6.4111459\bin\ninja.exe"
"cmTC_51346"

[1/2] Building C object CMakeFiles/cmTC_51346.dir/testCCompiler.c.o

FAILED:
E:\adt-bundle-windows-x86_64-20140702\adt-bundle-windows-x86_64-20140702\sdk\ndk\21.3.6528147\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe
--target=armv7-none-linux-androideabi16
--gcc-toolchain=E:/adt-bundle-windows-x86_64-20140702/adt-bundle-windows-x86_64-20140702/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64
--sysroot=E:/adt-bundle-windows-x86_64-20140702/adt-bundle-windows-x86_64-20140702/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64/sysroot
-g -DANDROID -fdata-sections -ffunction-sections -funwind-tables
-fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2
-march=armv7-a -mthumb -Wformat -Werror=format-security -fPIE -o
CMakeFiles/cmTC_51346.dir/testCCompiler.c.o -c
E:\Android\ndk\CppAndroidIosExample-master\Android\app.externalNativeBuild\cmake\debug\armeabi-v7a\CMakeFiles\CMakeTmp\testCCompiler.c

ninja: build stopped: subcommand failed.

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt

-- Configuring incomplete, errors occurred!
See also "E:/Android/ndk/CppAndroidIosExample-master/Android/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/CMakeOutput.log".
See also "E:/Android/ndk/CppAndroidIosExample-master/Android/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/CMakeError.log".

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions