Hello there,
This is my first post here. And, I’m really glad for joining this community.
I did build cpp-tests and a hello world for android like million years ago and unfortunately I cannot recall what I did at the time. So, I followed a few guides without any success.
The error I get is:
make.exe: Leaving directory `E:/dev/2d/hello2d/proj.android'
Building apk...
running: '"E:\dev\_tools\android\ant\ant" clean release -f E:\dev\2d\hello2d\pro
j.android\build.xml -Dsdk.dir="E:\dev\_tools\android\sdk"'
'"E:\dev\_tools\android\ant\ant"' is not recognized as an internal or external c
ommand,
operable program or batch file.
Error running command, return code: 1.
E:\dev>
I have an script which sets up all required environment variables for both Cocos2d-x and Unreal Engine which looks like this:
@echo off
cd %~dp0
set LANG=en_US.UTF-8
set MM_CHARSET=UTF-8
set LC_ALL=en_US.UTF-8
REM chcp 65001
set NDKROOT=%~dp0_tools\android\ndk
set ANDROID_SDK_ROOT=%~dp0_tools\android\sdk
set ANT_ROOT=%~dp0_tools\android\ant
set ANDROID_HOME=%~dp0_tools\android\sdk
set ANT_HOME=%~dp0_tools\android\ant
set JAVA_HOME=%~dp0_tools\android\jdk
set EMSCRIPTEN=%~dp0_tools\Emscripten\emscripten\1.34.1
set PATH=%~dp0_tools\cocos2d-x\tools\cocos2d-console\bin;%~dp0_tools\Git\bin;%ANT_HOME%\bin;%~dp0_tools\Python27;%~dp0_tools\android\ant\bin;%PATH%
echo.
echo %LANG% & echo %MM_CHARSET% & echo %LC_ALL%
echo.
echo %PATH%
echo.
echo %NDKROOT%
echo %ANDROID_SDK_ROOT%
echo %ANT_ROOT%
echo %ANDROID_HOME%
echo %ANT_HOME%
echo %JAVA_HOME%
echo %EMSCRIPTEN%
echo.
%comspec% /k
The output of the script is this:
en_US.UTF-8
UTF-8
en_US.UTF-8
E:\dev\_tools\cocos2d-x\tools\cocos2d-console\bin;E:\dev\_tools\Git\bin;E:\dev\_
tools\android\ant\bin;E:\dev\_tools\Python27;E:\dev\_tools\android\ant\bin;E:\de
v\_tools\Python27\;E:\dev\_tools\Python27\Scripts;C:\Windows\system32;C:\Windows
;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program
Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Windows Kits
\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tool
s\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files (
x86)\Skype\Phone\;C:\Program Files\nodejs\;E:\dev\_tools\Emscripten\clang\e1.34.
1_64bit;E:\dev\_tools\Emscripten\node\0.12.2_64bit;E:\dev\_tools\Emscripten\pyth
on\2.7.5.3_64bit;E:\dev\_tools\Emscripten\java\7.45_64bit\bin;E:\dev\_tools\Emsc
ripten;E:\dev\_tools\Emscripten\emscripten\1.34.1;E:\dev\_tools\Emscripten\crunc
h\1.03;E:\dev\_tools\Emscripten\mingw\4.6.2_32bit;C:\Program Files (x86)\GtkShar
p\2.12\bin;C:\Users\Administrator\AppData\Roaming\npm
E:\dev\_tools\android\ndk
E:\dev\_tools\android\sdk
E:\dev\_tools\android\ant
E:\dev\_tools\android\sdk
E:\dev\_tools\android\ant
E:\dev\_tools\android\jdk
E:\dev\_tools\Emscripten\emscripten\1.34.1
Then I do all the compilation stuff in that window:
cocos compile -s E:\dev\2d\hello2d\ -p android -m release -o E:\dev\2d\hello2d-output\
I do not know why it won’t add /bin/ant.bat to the end of E:\dev_tools\android\ant, instead of /ant.
I really appreciate your help. I’ve been scratching my head for hours, now.
