Archive 17/01/2023.

[Android][Solved] android build on windows cmake error

scorvi

[code]C:…\Engine\Urho3D>cmake -E chdir android-Build cmake -
G “Unix Makefiles” -DANDROID=1 -DCMAKE_TOOLCHAIN_FILE=…\Source\CMake\Toolchains
\android.toolchain.cmake -DLIBRARY_OUTPUT_PATH_ROOT=. …\Source
CMake Error: CMake was unable to find a build program corresponding to “Unix Mak
efiles”. CMAKE_MAKE_PROGRAM is not set. You probably need to select a differen
t build tool.
CMake Error: Error required internal CMake variable not set, cmake may be not be
built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be
built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module file: C:/…/Engi
ne/Urho3D/android-Build/CMakeFiles/2.8.12.2/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be
built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be
built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module file: C:/…/Engi
ne/Urho3D/android-Build/CMakeFiles/2.8.12.2/CMakeCXXCompiler.cmake
– Configuring incomplete, errors occurred!
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage

[/code]

i have a problem compiling the engine with the “cmake_android.bat " file on windows dont know why …
i did add " /tools”, “/platform-tools” and “” to PATH. i have installed visual studio 2013 and android studio.
did i forget something ?

[EDIT:]
so added “ANDROID_NDK=” and added “cmake_android.bat -DCMAKE_MAKE_PROGRAM=”%ANDROID_NDK%\prebuilt\windows\bin\make.exe"
but now i have a new error …

C:\....\Engine\Urho3D>cmake -E chdir Source\Android cmake
-G "Unix Makefiles" -DANDROID=1 -DCMAKE_TOOLCHAIN_FILE=..\CMake\Toolchains\andro
id.toolchain.cmake -DCMAKE_MAKE_PROGRAM="C:\....\Android\android-ndk-r9d
\prebuilt\windows\bin\make.exe -DLIBRARY_OUTPUT_PATH_ROOT=.   ..
CMake Error: The source directory "C:/..../Engine/Urho3D/So
urce/Android" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
gasp

Here is what i’ve do to be able to compile and send to my android device :

scorvi

wow lol thx

that did the trick and i had to delete all the cmake cache files too …