AndroidStudio 3.1.4
NDK 17.2.4988734 ,r16b
cmake 3.6.4111459
I try to create an new Project with include C++ support.But the project is always build failed.
Build command failed.
Error while executing process D:\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {-HE:\workspace\android-ndk-master\Makeup\app -BE:\workspace\android-ndk-master\Makeup\app\.externalNativeBuild\cmake\release\armeabi-v7a -DANDROID_ABI=armeabi-v7a -DANDROID_PLATFORM=android-24 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=E:\workspace\android-ndk-master\Makeup\app\build\intermediates\cmake\release\obj\armeabi-v7a -DCMAKE_BUILD_TYPE=Release -DANDROID_NDK=D:\Android\Sdk\androidndkr16b -DCMAKE_CXX_FLAGS= -DCMAKE_TOOLCHAIN_FILE=D:\Android\Sdk\androidndkr16b\build\cmake\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=D:\Android\Sdk\cmake\3.6.4111459\bin\ninja.exe -GAndroid Gradle - Ninja}
-- Configuring incomplete, errors occurred!
Parse error. Expected a command name, got unquoted argument with text "b".
Open File
Build command failed.
Error while executing process D:\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {-HE:\workspace\android-ndk-master\Makeup\app -BE:\workspace\android-ndk-master\Makeup\app\.externalNativeBuild\cmake\debug\armeabi-v7a -DANDROID_ABI=armeabi-v7a -DANDROID_PLATFORM=android-24 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=E:\workspace\android-ndk-master\Makeup\app\build\intermediates\cmake\debug\obj\armeabi-v7a -DCMAKE_BUILD_TYPE=Debug -DANDROID_NDK=D:\Android\Sdk\androidndkr16b -DCMAKE_CXX_FLAGS= -DCMAKE_TOOLCHAIN_FILE=D:\Android\Sdk\androidndkr16b\build\cmake\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=D:\Android\Sdk\cmake\3.6.4111459\bin\ninja.exe -GAndroid Gradle - Ninja}
-- Configuring incomplete, errors occurred!
Parse error. Expected a command name, got unquoted argument with text "b".
Open File
The problem has been solved.The global encryption software cause it.
Related
android studio 2021.2.1 on win10pro
i just moved to a new machine, and just did a "git clone" to pull my project. when i try to build it i get the error message below.
it appears cmake is failing, but there is no indication of WHY it is failing. i looked at all the various files and paths handed to cmake, and they all appear to exist.
how do i get cmake to give me more information about what has gone wrong?
[CXX1405] error when building with cmake using C:\Users\Gorilla\github\sunclock\sunclock1\app\src\main\cpp\CMakeLists.txt: Build command failed.
Error while executing process C:\Users\Gorilla\AppData\Local\Android\Sdk\cmake\3.18.1\bin\cmake.exe with arguments {-HC:\Users\Gorilla\github\sunclock\sunclock1\app\src\main\cpp -DCMAKE_SYSTEM_NAME=Android -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_SYSTEM_VERSION=26 -DANDROID_PLATFORM=android-26 -DANDROID_ABI=arm64-v8a -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a -DANDROID_NDK=C:\Users\Gorilla\AppData\Local\Android\Sdk\ndk\21.4.7075529 -DCMAKE_ANDROID_NDK=C:\Users\Gorilla\AppData\Local\Android\Sdk\ndk\21.4.7075529 -DCMAKE_TOOLCHAIN_FILE=C:\Users\Gorilla\AppData\Local\Android\Sdk\ndk\21.4.7075529\build\cmake\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=C:\Users\Gorilla\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Gorilla\github\sunclock\sunclock1\app\build\intermediates\cxx\Debug\14685u17\obj\arm64-v8a -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=C:\Users\Gorilla\github\sunclock\sunclock1\app\build\intermediates\cxx\Debug\14685u17\obj\arm64-v8a -DCMAKE_BUILD_TYPE=Debug -BC:\Users\Gorilla\github\sunclock\sunclock1\app.cxx\Debug\14685u17\arm64-v8a -GNinja}
I'm new with Cmake and ndk , when i build project i got this
Build command failed.
Error while executing process E:\AndroidSdkWindows\sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {-HC:\Users\Fehoo\Desktop\Rentie\android\butterfly-streamer -BC:\Users\Fehoo\Desktop\Rentie\android\butterfly-streamer\.externalNativeBuild\cmake\debug\armeabi-v7a -DANDROID_ABI=armeabi-v7a -DANDROID_PLATFORM=android-21 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Fehoo\Desktop\Rentie\android\butterfly-streamer\build\intermediates\cmake\debug\obj\armeabi-v7a -DCMAKE_BUILD_TYPE=Debug -DANDROID_NDK=C:\Users\Fehoo\sdk\ndk-bundle -DCMAKE_TOOLCHAIN_FILE=C:\Users\Fehoo\sdk\ndk-bundle\build\cmake\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=E:\AndroidSdkWindows\sdk\cmake\3.6.4111459\bin\ninja.exe -GAndroid Gradle - Ninja -DANDROID_STL=c++_static}
(include) CMakeLists.txt
-- Check for working C compiler: C:/Users/Fehoo/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
note*
I instale Cmake and ndk with location on C drive
my os is Windows 10 x64
I found the problem it was with the directory of c++ files in CMakeLists file
I want to learn how to write code in Android NDK.
I open the 'android studio guide' and on the 'create new ndk project' I follow the instruction.
I just create new project and add support for C++ code and that's it .. all the IDE code is in red and nothing can be compile.
Can't find any problem and I don't know what to do.
Tried to sync by clicking 'Try again' in first - and still fail.
The error message is:
CMake Error at
C:/Users/AppData/Local/Android/sdk/ndk-bundle/build/cmake/android.toolchain.cmake:40
(cmake_minimum_required): CMake 3.6.0 or higher is required. You
are running version 3.4.1 Call Stack (most recent call first):
C:/Users/AppData/Local/Android/sdk/cmake/share/cmake-3.4/Modules/CMakeDetermineSystem.cmake:98
(include) CMakeLists.txt CMake Error: CMAKE_C_COMPILER not set,
after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set, after
EnableLanguage
-- Configuring incomplete, errors occurred! Build command failed. Error while executing process
C:\Users\AppData\Local\Android\sdk\cmake\bin\cmake.exe with arguments
{-HC:\WORKSPACE\Android\Practice\NDK\Practice_001\app
-BC:\WORKSPACE\Android\Practice\NDK\Practice_001\app.externalNativeBuild\cmake\debug\armeabi
-GAndroid Gradle - Ninja -DANDROID_ABI=armeabi -DANDROID_NDK=C:\Users\Rn\AppData\Local\Android\sdk\ndk-bundle -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\WORKSPACE\Android\Practice\NDK\Practice_001\app\build\intermediates\cmake\debug\obj\armeabi
-DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=C:\Users\AppData\Local\Android\sdk\cmake\bin\ninja.exe
-DCMAKE_TOOLCHAIN_FILE=C:\Users\AppData\Local\Android\sdk\ndk-bundle\build\cmake\android.toolchain.cmake
-DANDROID_PLATFORM=android-24 -DCMAKE_CXX_FLAGS=-frtti -fexceptions} CMake Error at
C:/Users/AppData/Local/Android/sdk/ndk-bundle/build/cmake/android.toolchain.cmake:40
(cmake_minimum_required): CMake 3.6.0 or higher is required. You
are running version 3.4.1 Call Stack (most recent call first):
C:/Users/AppData/Local/Android/sdk/cmake/share/cmake-3.4/Modules/CMakeDetermineSystem.cmake:98
(include) CMakeLists.txt CMake Error: CMAKE_C_COMPILER not set,
after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set, after
EnableLanguage
-- Configuring incomplete, errors occurred!
Thanks for any help.
Click on the "Try again" in yellow banner. If you got the error still probably problem is with you do not have necessary library packages in your build.gradle file. Check if you have added necessary Support Library Packages in your build.gradle file. If doesn't then add it and "rebuild" your project.
Your error message is:
CMake 3.6.0 or higher is required. You are running version 3.4.1
I do not know whether you have your own CMake installation or you are attempting to use one that comes from Android Studio. My guess is that you have your own CMake installation. If so, upgrade it to 3.6.0 or higher.
I tried to create simple android application with NDK support. I followed https://developer.android.com/studio/projects/add-native-code.html#new-project while creating project. After creating project it gives me following error:
External Native Build Issues
Build command failed.
Error while executing 'C:\Users\Nilesh.Kashid\AppData\Local\Android\Sdk\cmake\3.6.3155560\bin\cmake.exe' with arguments {-HD:\AndroidNDKExample\app -BD:\AndroidNDKExample\app\.externalNativeBuild\cmake\release\armeabi -GAndroid Gradle - Ninja -DANDROID_ABI=armeabi -DANDROID_NDK=C:\Users\Nilesh.Kashid\AppData\Local\Android\Sdk\ndk-bundle -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=D:\AndroidNDKExample\app\build\intermediates\cmake\release\obj\armeabi -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=C:\Users\Nilesh.Kashid\AppData\Local\Android\Sdk\cmake\3.6.3155560\bin\ninja.exe -DCMAKE_TOOLCHAIN_FILE=C:\Users\Nilesh.Kashid\AppData\Local\Android\Sdk\cmake\3.6.3155560\android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=19 -DCMAKE_CXX_FLAGS=-frtti -fexceptions}
-- Configuring incomplete, errors occurred!
CMake Error at C:/Users/Nilesh.Kashid/AppData/Local/Android/sdk/cmake/3.6.3155560/android.toolchain.cmake:351 (message):
Failed to parse Android NDK revision:
C:/Users/Nilesh.Kashid/AppData/Local/Android/Sdk/ndk-bundle/source.properties.
Call Stack (most recent call first):
C:/Users/Nilesh.Kashid/AppData/Local/Android/sdk/cmake/3.6.3155560/share/cmake-3.6/Modules/CMakeDetermineSystem.cmake:98 (include)
CMakeLists.txt
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
Error:executing external native build for cmake D:\AndroidNDKExample\app\CMakeLists.txt
Build command failed.
Error while executing 'C:\Users\Nilesh.Kashid\AppData\Local\Android\Sdk\cmake\3.6.3155560\bin\cmake.exe' with arguments {-HD:\AndroidNDKExample\app -BD:\AndroidNDKExample\app\.externalNativeBuild\cmake\debug\armeabi -GAndroid Gradle - Ninja -DANDROID_ABI=armeabi -DANDROID_NDK=C:\Users\Nilesh.Kashid\AppData\Local\Android\Sdk\ndk-bundle -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=D:\AndroidNDKExample\app\build\intermediates\cmake\debug\obj\armeabi -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=C:\Users\Nilesh.Kashid\AppData\Local\Android\Sdk\cmake\3.6.3155560\bin\ninja.exe -DCMAKE_TOOLCHAIN_FILE=C:\Users\Nilesh.Kashid\AppData\Local\Android\Sdk\cmake\3.6.3155560\android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=19 -DCMAKE_CXX_FLAGS=-frtti -fexceptions}
-- Configuring incomplete, errors occurred!
CMake Error at C:/Users/Nilesh.Kashid/AppData/Local/Android/sdk/cmake/3.6.3155560/android.toolchain.cmake:351 (message):
Failed to parse Android NDK revision:
C:/Users/Nilesh.Kashid/AppData/Local/Android/Sdk/ndk-bundle/source.properties.
Call Stack (most recent call first):
C:/Users/Nilesh.Kashid/AppData/Local/Android/sdk/cmake/3.6.3155560/share/cmake-3.6/Modules/CMakeDetermineSystem.cmake:98 (include)
CMakeLists.txt
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
Error:executing external native build for cmake D:\AndroidNDKExample\app\CMakeLists.txt
I have downloaded CMake and LLDB android I am using Android Studio 2.2.3 version.
I had the same problem. This problem occurs in older versions of ndk.
Failed to parse Android NDK revision:
The problem was resolved after updating ndk.
The current ndk version is 13.1.3345770.
Reference :
https://developer.android.com/ndk/guides/index.html
I tried to build my android project, I got this error message.
Error while executing 'C:\Users\Chen\AppData\Local\Android\Sdk\cmake\3.6.3155560\bin\cmake.exe' with arguments {-HC:\Users\Chen\Desktop\Project\IPS-Competition-master-326592647c34e3535eb78372bea8ec1c58ca6160\IPS-Competition-master-326592647c34e3535eb78372bea8ec1c58ca6160\IPS_Android\app -BC:\Users\Chen\Desktop\Project\IPS-Competition-master-326592647c34e3535eb78372bea8ec1c58ca6160\IPS-Competition-master-326592647c34e3535eb78372bea8ec1c58ca6160\IPS_Android\app.externalNativeBuild\cmake\release\armeabi -GAndroid Gradle - Ninja -DANDROID_ABI=armeabi -DANDROID_NDK=C:\Users\Chen\AppData\Local\Android\Sdk\ndk-bundle -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Chen\Desktop\Project\IPS-Competition-master-326592647c34e3535eb78372bea8ec1c58ca6160\IPS-Competition-master-326592647c34e3535eb78372bea8ec1c58ca6160\IPS_Android\app\build\intermediates\cmake\release\obj\armeabi -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=C:\Users\Chen\AppData\Local\Android\Sdk\cmake\3.6.3155560\bin\ninja.exe -DCMAKE_TOOLCHAIN_FILE=C:\Users\Chen\AppData\Local\Android\Sdk\ndk-bundle\build\cmake\android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=15 -DCMAKE_CXX_FLAGS=}
-- Check for working C compiler: C:/Users/Chen/AppData/Local/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
-- Check for working C compiler: C:/Users/Chen/AppData/Local/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- broken
-- Configuring incomplete, errors occurred!
CMake Error: Could not open file for write in copy operation C:/Users/Chen/Desktop/Project/IPS-Competition-master-326592647c34e3535eb78372bea8ec1c58ca6160/IPS-Competition-master-326592647c34e3535eb78372bea8ec1c58ca6160/IPS_Android/app/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/3.6.0-rc2/CMakeCCompiler.cmake.tmp
CMake Error: : System Error: No such file or directory
I've installed CMAKE, LLDB, NDK. Can I get some help?
Thanks.
I think you need to install compiler driver of c++.