Cocos run -p android 报错:文件名、目录名卷标语法不正确

如题,不会截图 ,拷贝一部分错误信息

Updated project.properties
Updated local.properties
Updated file D:\deveop\Test\proj.android…\cocos2d\cocos\2d\platform\android\ja
va\proguard-project.txt
running: ‘“D:\develop\adt-bundle-windows-x86-20140321\apache-ant-1.9.3\bin\ant”
clean debug -f D:\deveop\Test\proj.android\build.xml -Dsdk.dir=“D:\develop\adt-b
undle-windows-x86-20140321\sdk”’

文件名、目录名或卷标语法不正确。
Error running command, return code: 1

哪个大大能说下,我的文件名没有包含中文 空格。。。

1赞

你可以用qq截图一下,然后保存上传一下,你这部分的是没有错误的,错误的提示信息应该还是在下面

相同错误,顶起,求真相

没有人知道为什么吗?

自己解决了,我的解决方案:
打包项目
1.
需要修改项目文件夹下
…\frameworks\runtime-src\proj.android\build.xml
中最后 $sdk.dir 替换成adt\sdk绝对路径
2.
修改cocos2dx文件夹下
…\tools\cocos2d-console\plugins\project_compile
中的build_android.py
command = "%s clean -f %s -Dsdk.dir=s" (self._convert_path_to_cmd(ant_path), buildfile_path, self._convert_path_to_cmd(sdk_root))
改成
command = "%s clean %s -f s" (self._convert_path_to_cmd(ant_path), build_mode, buildfile_path)

然后用cmd,移动到项目文件夹下,运行
cocos run -p android
完成

文件名、目录名或卷标语法不正确。
Error running command, return code: 1

到这里就是最后面啦。。。下面没有啦

文件名、目录名或卷标语法不正确。
Error running command, return code: 1

到这里就是最后面啦。。。下面没有啦

command = "%s clean %s -f %s" % (self._convert_path_to_cmd(ant_path), build_

mode, buildfile_path)这个是不是哪里错了 运行提示 build_mode这里有错误。。。

同样的问题,求真相,另joy19851110的方法谁使用成功了?

同样的问题,虽能帮帮我

Compile++ thumb: box2d_static <= b2ChainAndCircleContact.cpp
Compile++ thumb: box2d_static <= b2ChainAndPolygonContact.cpp
Compile++ thumb: box2d_static <= b2CircleContact.cpp
Compile++ thumb: box2d_static <= b2Contact.cpp
Compile++ thumb: box2d_static <= b2ContactSolver.cpp
Compile++ thumb: box2d_static <= b2EdgeAndCircleContact.cpp
Compile++ thumb: box2d_static <= b2EdgeAndPolygonContact.cpp
Compile++ thumb: box2d_static <= b2PolygonAndCircleContact.cpp
Compile++ thumb: box2d_static <= b2PolygonContact.cpp
Compile++ thumb: box2d_static <= b2DistanceJoint.cpp
Compile++ thumb: box2d_static <= b2FrictionJoint.cpp
Compile++ thumb: box2d_static <= b2GearJoint.cpp
Compile++ thumb: box2d_static <= b2Joint.cpp
Compile++ thumb: box2d_static <= b2MotorJoint.cpp
Compile++ thumb: box2d_static <= b2MouseJoint.cpp
Compile++ thumb: box2d_static <= b2PrismaticJoint.cpp
Compile++ thumb: box2d_static <= b2PulleyJoint.cpp
Compile++ thumb: box2d_static <= b2RevoluteJoint.cpp
Compile++ thumb: box2d_static <= b2RopeJoint.cpp
Compile++ thumb: box2d_static <= b2WeldJoint.cpp
Compile++ thumb: box2d_static <= b2WheelJoint.cpp
Compile++ thumb: box2d_static <= b2Rope.cpp
StaticLibrary : libbox2d.a
Compile thumb : chipmunk_static <= chipmunk.c
Compile thumb : chipmunk_static <= cpArbiter.c
Compile thumb : chipmunk_static <= cpArray.c
Compile thumb : chipmunk_static <= cpBB.c
Compile thumb : chipmunk_static <= cpBBTree.c
Compile thumb : chipmunk_static <= cpBody.c
Compile thumb : chipmunk_static <= cpCollision.c
Compile thumb : chipmunk_static <= cpHashSet.c
Compile thumb : chipmunk_static <= cpPolyShape.c
Compile thumb : chipmunk_static <= cpShape.c
Compile thumb : chipmunk_static <= cpSpace.c
Compile thumb : chipmunk_static <= cpSpaceComponent.c
Compile thumb : chipmunk_static <= cpSpaceHash.c
Compile thumb : chipmunk_static <= cpSpaceQuery.c
Compile thumb : chipmunk_static <= cpSpaceStep.c
Compile thumb : chipmunk_static <= cpSpatialIndex.c
Compile thumb : chipmunk_static <= cpSweep1D.c
Compile thumb : chipmunk_static <= cpVect.c
Compile thumb : chipmunk_static <= cpConstraint.c
Compile thumb : chipmunk_static <= cpDampedRotarySpring.c
Compile thumb : chipmunk_static <= cpDampedSpring.c
Compile thumb : chipmunk_static <= cpGearJoint.c
Compile thumb : chipmunk_static <= cpGrooveJoint.c
Compile thumb : chipmunk_static <= cpPinJoint.c
Compile thumb : chipmunk_static <= cpPivotJoint.c
Compile thumb : chipmunk_static <= cpRatchetJoint.c
Compile thumb : chipmunk_static <= cpRotaryLimitJoint.c
Compile thumb : chipmunk_static <= cpSimpleMotor.c
Compile thumb : chipmunk_static <= cpSlideJoint.c
StaticLibrary : libchipmunk.a
Compile++ thumb: cocos2dxandroid_static <= CCApplication.cpp
Compile++ thumb: cocos2dxandroid_static <= CCCommon.cpp
Compile++ thumb: cocos2dxandroid_static <= CCDevice.cpp
Compile++ thumb: cocos2dxandroid_static <= CCGLView.cpp
Compile++ thumb: cocos2dxandroid_static <= CCFileUtilsAndroid.cpp
Compile++ thumb: cocos2dxandroid_static <= javaactivity.cpp
Compile++ thumb: cocos2dxandroid_static <= DPIJni.cpp
Compile++ thumb: cocos2dxandroid_static <= IMEJni.cpp
Compile++ thumb: cocos2dxandroid_static <= Java_org_cocos2dx_lib_Cocos
2dxAccelerometer.cpp
Compile++ thumb: cocos2dxandroid_static <= Java_org_cocos2dx_lib_Cocos
2dxBitmap.cpp
Compile++ thumb: cocos2dxandroid_static <= Java_org_cocos2dx_lib_Cocos
2dxHelper.cpp
Compile++ thumb: cocos2dxandroid_static <= Java_org_cocos2dx_lib_Cocos
2dxRenderer.cpp
Compile++ thumb: cocos2dxandroid_static <= JniHelper.cpp
Compile++ thumb: cocos2dxandroid_static <= TouchesJni.cpp
StaticLibrary : libcocos2dandroid.a
Compile thumb : cpufeatures <= cpu-features.c
StaticLibrary : libcpufeatures.a
SharedLibrary : libcocos2dcpp.so
Install : libcocos2dcpp.so => libs/armeabi/libcocos2dcpp.so
make.exe: Leaving directory `D:/workFile/MyGame/proj.android’
building apk
Android platform not specified, searching a default one…
android-19 is found
running: ‘“d:\android_root\adk\sdk\tools\android” update project -t android-19 -
p D:\workFile\MyGame\proj.android’

Updated project.properties
Updated local.properties
Updated file D:\workFile\MyGame\proj.android\proguard-project.txt
Android platform not specified, searching a default one…
android-19 is found
running: ‘“d:\android_root\adk\sdk\tools\android” update lib-project -p D:\workF
ile\MyGame\proj.android…/cocos2d/cocos/2d/platform/android/java -t android-19’

Updated project.properties
Updated local.properties
Updated file D:\workFile\MyGame\proj.android…\cocos2d\cocos\2d\platform\androi
d\java\proguard-project.txt
running: ‘“d:\android_root\ant\apache-ant-1.9.3\bin\ant” clean debug -f D:\workF
ile\MyGame\proj.android\build.xml -Dsdk.dir=“d:\android_root\adk\sdk”’

文件名、目录名或卷标语法不正确。
Error running command, return code: 1
D:\workFile\MyGame>cocos compile -p android

D:\workFile\MyGame>python D:\cocos2d-root\tools\cocos2d-console\bin/cocos.py co
mpile -p android
Runing command: compile
Building mode: debug
building native
The Selected NDK toolchain version was 4.8 !
running: ‘D:\android_root\ndk\android-ndk-r9d\ndk-build -C D:\workFile\MyGame\pr
oj.android -j1 NDK_MODULE_PATH=D:\workFile\MyGame\proj.android…/cocos2d;D:\wor
kFile\MyGame\proj.android…/cocos2d/cocos;D:\workFile\MyGame\proj.android…/co
cos2d/external NDK_DEBUG=1’

Android NDK: WARNING: APP_PLATFORM android-19 is larger than android:minSdkVersi
on 9 in ./AndroidManifest.xml
Android NDK: WARNING:D:\workFile\MyGame\proj.android…/cocos2d/cocos/2d/Android
.mk:cocos2dx_static: LOCAL_LDLIBS is always ignored for static libraries
Android NDK: WARNING:D:\workFile\MyGame\proj.android…/cocos2d/cocos/2d/platfor
m/android/Android.mk:cocos2dxandroid_static: LOCAL_LDLIBS is always ignored for
static libraries
make.exe: Entering directory D:/workFile/MyGame/proj.android' Gdbserver : libs/armeabi/gdbserver Gdbsetup : libs/armeabi/gdb.setup Install : libcocos2dcpp.so => libs/armeabi/libcocos2dcpp.so make.exe: Leaving directory D:/workFile/MyGame/proj.android’
building apk
Android platform not specified, searching a default one…
android-19 is found
running: ‘“d:\android_root\adk\sdk\tools\android” update project -t android-19 -
p D:\workFile\MyGame\proj.android’

Updated project.properties
Updated local.properties
Updated file D:\workFile\MyGame\proj.android\proguard-project.txt
Android platform not specified, searching a default one…
android-19 is found
running: ‘“d:\android_root\adk\sdk\tools\android” update lib-project -p D:\workF
ile\MyGame\proj.android…/cocos2d/cocos/2d/platform/android/java -t android-19’

Updated project.properties
Updated local.properties
Updated file D:\workFile\MyGame\proj.android…\cocos2d\cocos\2d\platform\androi
d\java\proguard-project.txt
running: ‘“d:\android_root\ant\apache-ant-1.9.3\bin\ant” clean debug -f D:\workF
ile\MyGame\proj.android\build.xml -Dsdk.dir=“d:\android_root\adk\sdk”’

文件名、目录名或卷标语法不正确。
Error running command, return code: 1
D:\workFile\MyGame>cocos compile -p android

D:\workFile\MyGame>python D:\cocos2d-root\tools\cocos2d-console\bin/cocos.py co
mpile -p android
Runing command: compile
Building mode: debug
building native
The Selected NDK toolchain version was 4.8 !
running: ‘D:\android_root\ndk\android-ndk-r9d\ndk-build -C D:\workFile\MyGame\pr
oj.android -j1 NDK_MODULE_PATH=D:\workFile\MyGame\proj.android…/cocos2d;D:\wor
kFile\MyGame\proj.android…/cocos2d/cocos;D:\workFile\MyGame\proj.android…/co
cos2d/external NDK_DEBUG=1’

Android NDK: WARNING: APP_PLATFORM android-19 is larger than android:minSdkVersi
on 9 in ./AndroidManifest.xml
Android NDK: WARNING:D:\workFile\MyGame\proj.android…/cocos2d/cocos/2d/Android
.mk:cocos2dx_static: LOCAL_LDLIBS is always ignored for static libraries
Android NDK: WARNING:D:\workFile\MyGame\proj.android…/cocos2d/cocos/2d/platfor
m/android/Android.mk:cocos2dxandroid_static: LOCAL_LDLIBS is always ignored for
static libraries
make.exe: Entering directory D:/workFile/MyGame/proj.android' Gdbserver : libs/armeabi/gdbserver Gdbsetup : libs/armeabi/gdb.setup Install : libcocos2dcpp.so => libs/armeabi/libcocos2dcpp.so make.exe: Leaving directory D:/workFile/MyGame/proj.android’
building apk
Android platform not specified, searching a default one…
android-19 is found
running: ‘“d:\android_root\adk\sdk\tools\android” update project -t android-19 -
p D:\workFile\MyGame\proj.android’

Updated project.properties
Updated local.properties
Updated file D:\workFile\MyGame\proj.android\proguard-project.txt
Android platform not specified, searching a default one…
android-19 is found
running: ‘“d:\android_root\adk\sdk\tools\android” update lib-project -p D:\workF
ile\MyGame\proj.android…/cocos2d/cocos/2d/platform/android/java -t android-19’

Updated project.properties
Updated local.properties
Updated file D:\workFile\MyGame\proj.android…\cocos2d\cocos\2d\platform\androi
d\java\proguard-project.txt
running: ‘“d:\android_root\ant\apache-ant-1.9.3\bin\ant” clean debug -f D:\workF
ile\MyGame\proj.android\build.xml -Dsdk.dir=“d:\android_root\adk\sdk”’

文件名、目录名或卷标语法不正确。
Error running command, return code: 1
D:\workFile\MyGame>cocos compile -p android

D:\workFile\MyGame>python D:\cocos2d-root\tools\cocos2d-console\bin/cocos.py co
mpile -p android
Runing command: compile
Building mode: debug
building native
The Selected NDK toolchain version was 4.8 !
running: ‘D:\android_root\ndk\android-ndk-r9d\ndk-build -C D:\workFile\MyGame\pr
oj.android -j1 NDK_MODULE_PATH=D:\workFile\MyGame\proj.android…/cocos2d;D:\wor
kFile\MyGame\proj.android…/cocos2d/cocos;D:\workFile\MyGame\proj.android…/co
cos2d/external NDK_DEBUG=1’

Android NDK: WARNING: APP_PLATFORM android-19 is larger than android:minSdkVersi
on 9 in ./AndroidManifest.xml
Android NDK: WARNING:D:\workFile\MyGame\proj.android…/cocos2d/cocos/2d/Android
.mk:cocos2dx_static: LOCAL_LDLIBS is always ignored for static libraries
Android NDK: WARNING:D:\workFile\MyGame\proj.android…/cocos2d/cocos/2d/platfor
m/android/Android.mk:cocos2dxandroid_static: LOCAL_LDLIBS is always ignored for
static libraries
make.exe: Entering directory D:/workFile/MyGame/proj.android' Gdbserver : libs/armeabi/gdbserver Gdbsetup : libs/armeabi/gdb.setup Install : libcocos2dcpp.so => libs/armeabi/libcocos2dcpp.so make.exe: Leaving directory D:/workFile/MyGame/proj.android’
building apk
Android platform not specified, searching a default one…
android-19 is found
running: ‘“d:\android_root\adk\sdk\tools\android” update project -t android-19 -
p D:\workFile\MyGame\proj.android’

Updated project.properties
Updated local.properties
Updated file D:\workFile\MyGame\proj.android\proguard-project.txt
Android platform not specified, searching a default one…
android-19 is found
running: ‘“d:\android_root\adk\sdk\tools\android” update lib-project -p D:\workF
ile\MyGame\proj.android…/cocos2d/cocos/2d/platform/android/java -t android-19’

Updated project.properties
Updated local.properties
Updated file D:\workFile\MyGame\proj.android…\cocos2d\cocos\2d\platform\androi
d\java\proguard-project.txt
running: ‘“d:\android_root\ant\apache-ant-1.9.3\bin\ant” clean debug -f D:\workF
ile\MyGame\proj.android\build.xml -Dsdk.dir=“d:\android_root\adk\sdk”’

文件名、目录名或卷标语法不正确。
Error running command, return code: 1
D:\workFile\MyGame>cocos compile -p android

D:\workFile\MyGame>python D:\cocos2d-root\tools\cocos2d-console\bin/cocos.py co
mpile -p android
Runing command: compile
Building mode: debug
building native
The Selected NDK toolchain version was 4.8 !
running: ‘D:\android_root\ndk\android-ndk-r9d\ndk-build -C D:\workFile\MyGame\pr
oj.android -j1 NDK_MODULE_PATH=D:\workFile\MyGame\proj.android…/cocos2d;D:\wor
kFile\MyGame\proj.android…/cocos2d/cocos;D:\workFile\MyGame\proj.android…/co
cos2d/external NDK_DEBUG=1’

Android NDK: WARNING: APP_PLATFORM android-19 is larger than android:minSdkVersi
on 9 in ./AndroidManifest.xml
Android NDK: WARNING:D:\workFile\MyGame\proj.android…/cocos2d/cocos/2d/Android
.mk:cocos2dx_static: LOCAL_LDLIBS is always ignored for static libraries
Android NDK: WARNING:D:\workFile\MyGame\proj.android…/cocos2d/cocos/2d/platfor
m/android/Android.mk:cocos2dxandroid_static: LOCAL_LDLIBS is always ignored for
static libraries
make.exe: Entering directory D:/workFile/MyGame/proj.android' Gdbserver : libs/armeabi/gdbserver Gdbsetup : libs/armeabi/gdb.setup Install : libcocos2dcpp.so => libs/armeabi/libcocos2dcpp.so make.exe: Leaving directory D:/workFile/MyGame/proj.android’
building apk
Android platform not specified, searching a default one…
android-19 is found
running: ‘“d:\android_root\adk\sdk\tools\android” update project -t android-19 -
p D:\workFile\MyGame\proj.android’

Updated project.properties
Updated local.properties
Updated file D:\workFile\MyGame\proj.android\proguard-project.txt
Android platform not specified, searching a default one…
android-19 is found
running: ‘“d:\android_root\adk\sdk\tools\android” update lib-project -p D:\workF
ile\MyGame\proj.android…/cocos2d/cocos/2d/platform/android/java -t android-19’

Updated project.properties
Updated local.properties
Updated file D:\workFile\MyGame\proj.android…\cocos2d\cocos\2d\platform\androi
d\java\proguard-project.txt
running: ‘“d:\android_root\ant\apache-ant-1.9.3\bin\ant” clean debug -f D:\workF
ile\MyGame\proj.android\build.xml -Dsdk.dir=“d:\android_root\adk\sdk”’

文件名、目录名或卷标语法不正确。
Error running command, return code: 1

相同的错误,我把错误提示贴上来了


Runing command: compile
Building mode: debug
building native
The Selected NDK toolchain version was 4.8 !
running: 'D:\develop\android-ndk-r9d\ndk-build -C E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android -j1 NDK_MODULE_PATH=E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings;E:\coc
o2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/external;E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x;E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\fra
meworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos;E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/external NDK_DEBUG=1'

Android NDK: WARNING:E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/2d/Android.mk:cocos2dx_static: LOCAL_LDLIBS is always ignored for static libraries
Android NDK: WARNING:E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/2d/platform/android/Android.mk:cocos2dxandroid_static: LOCAL_LDLIBS is always ignored for static libraries
make.exe: Entering directory `E:/coco2d/Cocos2d-JS-v3.0-alpha/hellworld/frameworks/runtime-src/proj.android'
 Gdbserver      :  libs/armeabi/gdbserver
 Gdbsetup       : libs/armeabi/gdb.setup
directory D:/develop/android-ndk-r9d/platforms/android-9/arch-arm/usr/include D:/develop/android-ndk-r9d/sources/android/native_app_glue E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/externa
l/Box2D/.. D:/develop/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include D:/develop/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi/include D:/develop/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/backward E:\coco2d\
Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/external/chipmunk/include/chipmunk jni/../../Classes E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/bindi
ngs/manual E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/bindings/auto E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/bindings/../cocos2d-x/cocos/audio
/include E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/bindings/manual/chipmunk E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/bindings/manual/extensio
n E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/bindings/manual/localstorage E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/bindings/manual/ui E:\coco2
d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/bindings/manual/cocostudio E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/bindings/manual/network E:\coco2d\Cocos
2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/bindings/manual/cocosbuilder E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/2d E:\coco2d\Cocos2d-JS-v3.0
-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/2d/renderer E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/2d/../math/kazmath platform/android E:\
coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/2d/../physics E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/2d/../base E:\c
oco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/2d/../../external/tinyxml2 E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/2d/
../../external/unzip E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/2d/../../external/chipmunk/include/chipmunk E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.and
roid\../../js-bindings/external/spidermonkey/prebuilt/android/../../include/android E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/audio/android/../include E:\coco2d\Cocos2d-JS-v3.0-alp
ha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/extensions/.. E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/extensions/GUI/CCControlExtension E:\coco2d\Cocos2d-J
S-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/extensions/GUI/CCScrollView E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/storage/local-storage/.
. E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/ui/.. E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/ui/../editor-suppo
rt E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/editor-support/cocostudio/.. E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/
cocos/editor-support/cocostudio/../../../external E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/network/.. E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android
\../../js-bindings/cocos2d-x/external/websockets/prebuilt/android/../../include/android E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/editor-support/cocosbuilder/.. E:\coco2d\Cocos2d-J
S-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/editor-support/cocosbuilder/../../.. E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/external/freet
ype2/prebuilt/android/../../include/android E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/external/freetype2/prebuilt/android/../../include/android/freetype2 E:\coco2d\Cocos2d-JS-v3.0-alpha\
hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/2d/platform/android E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/external/curl/prebuilt/android/../../include
/android E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/external/png/prebuilt/android/../../include/android E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../..
/js-bindings/cocos2d-x/external/jpeg/prebuilt/android/../../include/android E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/external/tiff/prebuilt/android/../../include/android E:\coco2d\Cocos
2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/external/webp/prebuilt/android/../../include/android D:/develop/android-ndk-r9d/sources/android/cpufeatures E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\framework
s\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/2d/../../external/edtaa3func E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/2d/platform/android/../.. E:\coco2d\Cocos2d-JS-v
3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/2d/platform/android/../../../base E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/2d/platform/an
droid/../../../math/kazmath E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/2d/platform/android/../../../physics E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.and
roid\../../js-bindings/bindings/../cocos2d-x/cocos/storage E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/bindings/../cocos2d-x/extensions E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-s
rc\proj.android\../../js-bindings/bindings/../cocos2d-x/cocos/editor-support/spine E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/storage/local-storage/../../2d E:\coco2d\Cocos2d-JS-v3.
0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/network/../../2d E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/ui/../2d E:\coco2d\Cocos2d-JS-v3.
0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/ui/../../external E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/editor-support/cocosbuilder/../.
./2d E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/audio/android/../../math/kazmath E:\coco2d\Cocos2d-JS-v3.0-alpha\hellword\frameworks\runtime-src\proj.android\../../js-bindings/cocos
2d-x/cocos/audio/android/../../2d E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/audio/android/../../2d/platform/android E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src
\proj.android\../../js-bindings/cocos2d-x/cocos/audio/android/../../base E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/audio/android/../../physics E:\coco2d\Cocos2d-JS-v3.0-alpha\hellw
orld\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/editor-support/cocostudio/../../2d E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/bindings/manual/cocosbuilder/../../../cocos2
d-x/cocos/editor-support/cocosbuilder E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/bindings/manual/extension/../../../cocos2d-x/extensions E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime
-src\proj.android\../../js-bindings/bindings/manual/localstorage/../../../cocos2d-x/extensions E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/bindings/manual/cocostudio/../../../cocos2d-x/extensions E:
\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/bindings/manual/cocostudio/../../../cocos2d-x/cocos/editor-support/cocostudio E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\
../../js-bindings/bindings/manual/ui/../../../cocos2d-x/extensions E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\../../js-bindings/bindings/manual/ui/../../../cocos2d-x/cocos/ui >> ./libs/armeabi/gdb.setup
 Install        : libcocos2djs.so => libs/armeabi/libcocos2djs.so
make.exe: Leaving directory `E:/coco2d/Cocos2d-JS-v3.0-alpha/hellworld/frameworks/runtime-src/proj.android'
building apk
Android platform not specified, searching a default one...
android-10 is found
running: '"D:\develop\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk\tools\android" update project -t android-10 -p E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android'
Updated project.properties
Updated local.properties
Updated file E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\..\..\js-bindings\cocos2d-x\cocos\2d\platform\android\java\proguard-project.txt
running: '"D:\devtools\apache-ant-1.9.3-bin\apache-ant-1.9.3\bin\ant" clean debug -f E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\build.xml -Dsdk.dir="D:\develop\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x
86_64-20131030\sdk"'

文件名、目录名或卷标语法不正确。
Error running command, return code: 1


楼上的办法试过了,不行

咦,你用这种方式编译APK呀,有没有试过旧的方式,就是用build_native.*那个,在proj.android目录下,在Mac下叫build_native.py。Windows下不太清楚哪个名字。

最好先检查一下路径,直接在命令行窗口执行最后提示出错的命令,看看有无有用点的提示:
“D:\devtools\apache-ant-1.9.3-bin\apache-ant-1.9.3\bin\ant” clean debug -f E:\coco2d\Cocos2d-JS-v3.0-alpha\hellworld\frameworks\runtime-src\proj.android\build.xml -Dsdk.dir=“D:\develop\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x
86_64-20131030\sdk”

build_native.py试过,一闪而过啦····直接执行命令显示不是内部命令····

貌似是这个build_android.py有bug,,,搞不懂····想@版主啊····

E:\cocos3.0\projects\AndroidTest>cocos run -p android
E:\cocos3.0\projects\AndroidTest>python D:\develop\cocos2d-x-3.0\tools\cocos2d-console\bin\/cocos.py run -p androidRuning command: compileBuilding mode: debugbuilding nativeThe Selected NDK toolchain version was 4.7 !running: 'D:\develop\NDK\ndk-build -C E:\cocos3.0\projects\AndroidTest\proj.android -j1 NDK_MODULE_PATH=E:\cocos3.0\projects\AndroidTest\proj.android\../cocos2d;E:\cocos3.0\projects\AndroidTest\proj.android\../cocos2d/cocos;E:\cocos3.0\projects\AndroidTest\proj.android\../cocos2d/external NDK_DEBUG=1'
make: Entering directory `E:/cocos3.0/projects/AndroidTest/proj.android'Gdbserver      :  libs/armeabi/gdbserverGdbsetup       : libs/armeabi/gdb.setupInstall        : libcocos2dcpp.so => libs/armeabi/libcocos2dcpp.somake: Leaving directory `E:/cocos3.0/projects/AndroidTest/proj.android'building apkAndroid platform not specified, searching a default one...android-11 is foundrunning: '"D:\develop\adt-bundle-windows-x86-20140321\sdk\tools\android" updateproject -t android-11 -p E:\cocos3.0\projects\AndroidTest\proj.android'
Updated project.propertiesUpdated local.propertiesUpdated file E:\cocos3.0\projects\AndroidTest\proj.android\proguard-project.txtIt seems that there are sub-projects. If you want to update themplease use the --subprojects parameter.Android platform not specified, searching a default one...android-11 is foundrunning: '"D:\develop\adt-bundle-windows-x86-20140321\sdk\tools\android" updatelib-project -p E:\cocos3.0\projects\AndroidTest\proj.android\../cocos2d/cocos/2d/platform/android/java -t android-11'
Updated project.propertiesUpdated local.propertiesUpdated file E:\cocos3.0\projects\AndroidTest\proj.android\..\cocos2d\cocos\2d\platform\android\java\proguard-project.txtrunning: '"D:\develop\adt-bundle-windows-x86-20140321\sdk\tools\android" updateproject -t android-11 -p E:\cocos3.0\projects\AndroidTest\proj.android'
Updated project.propertiesUpdated local.propertiesUpdated file E:\cocos3.0\projects\AndroidTest\proj.android\proguard-project.txtIt seems that there are sub-projects. If you want to update themplease use the --subprojects parameter.Traceback (most recent call last):  File "D:\develop\cocos2d-x-3.0\tools\cocos2d-console\bin\/cocos.py", line 384, in <module>    run_plugin(command, argv, plugins)  File "D:\develop\cocos2d-x-3.0\tools\cocos2d-console\bin\/cocos.py", line 353, in run_plugin    dependencies_objects = run_plugin(dep_name, argv, plugins)  File "D:\develop\cocos2d-x-3.0\tools\cocos2d-console\bin\/cocos.py", line 353, in run_plugin    dependencies_objects = run_plugin(dep_name, argv, plugins)  File "D:\develop\cocos2d-x-3.0\tools\cocos2d-console\bin\/cocos.py", line 355, in run_plugin    plugin.run(argv, dependencies_objects)  File "D:\develop\cocos2d-x-3.0\tools\cocos2d-console\bin\..\plugins\project_compile\project_compile.py", line 929, in run    self.build_android()  File "D:\develop\cocos2d-x-3.0\tools\cocos2d-console\bin\..\plugins\project_compile\project_compile.py", line 322, in build_android    self.apk_path = builder.do_build_apk(sdk_root, ant_root, self._ap, build_mode, output_dir)  File "D:\develop\cocos2d-x-3.0\tools\cocos2d-console\bin\..\plugins\project_compile\build_android.py", line 258, in do_build_apk    shutil.copy(apk_path, output_dir)  File "C:\Python27\lib\shutil.py", line 116, in copy    copyfile(src, dst)  File "C:\Python27\lib\shutil.py", line 81, in copyfile    with open(src, 'rb') as fsrc:IOError:  No such file or directory: u'E:\\cocos3.0\\projects\\AndroidTest\\proj.android\\bin\\AndroidTest-debug.apk'E:\cocos3.0\projects\AndroidTest>start

大神,按你说的做了后又出现新的问题····能帮忙看一下吗

直接把command = "%s clean -f %s -Dsdk.dir=s" (self._convert_path_to_cmd(ant_path), buildfile_path, self._convert_path_to_cmd(sdk_root))改成

command = "%s clean -f %s -Dsdk.dir=s" (self._convert_path_to_cmd(ant_path), buildfile_path, sdk_root)去掉外层的路径转换处理

自己试过,编译过去了。希望有帮助!

怎么改?这段代码是自动生成的!

ANT_HOME is set incorrectly or ant could not be located. Please set ANT_HOME.
Traceback (most recent call last):
  File "D:\develop\cocos2d-x-3.0\tools\cocos2d-console\bin\/cocos.py", line 384,
 in <module>
    run_plugin(command, argv, plugins)
  File "D:\develop\cocos2d-x-3.0\tools\cocos2d-console\bin\/cocos.py", line 353,
 in run_plugin
    dependencies_objects = run_plugin(dep_name, argv, plugins)
  File "D:\develop\cocos2d-x-3.0\tools\cocos2d-console\bin\/cocos.py", line 353,
 in run_plugin
    dependencies_objects = run_plugin(dep_name, argv, plugins)
  File "D:\develop\cocos2d-x-3.0\tools\cocos2d-console\bin\/cocos.py", line 355,
 in run_plugin
    plugin.run(argv, dependencies_objects)
  File "D:\develop\cocos2d-x-3.0\tools\cocos2d-console\bin\..\plugins\project_co
mpile\project_compile.py", line 929, in run
    self.build_android()
  File "D:\develop\cocos2d-x-3.0\tools\cocos2d-console\bin\..\plugins\project_co
mpile\project_compile.py", line 322, in build_android
    self.apk_path = builder.do_build_apk(sdk_root, ant_root, self._ap, build_mod
e, output_dir)
  File "D:\develop\cocos2d-x-3.0\tools\cocos2d-console\bin\..\plugins\project_co
mpile\build_android.py", line 258, in do_build_apk
    shutil.copy(apk_path, output_dir)
  File "C:\Python27\lib\shutil.py", line 116, in copy
    copyfile(src, dst)
  File "C:\Python27\lib\shutil.py", line 81, in copyfile
    with open(src, 'rb') as fsrc:
IOError:  No such file or directory: u'E:\\cocos3.0\\projects\\AndroidT
est\\proj.android\\bin\\AndroidTest-debug.apk'
E:\cocos3.0\projects\AndroidTest>

大神,我按照你说的修改了一下,又出现新的错误···能帮忙看一下吗?python我不是很懂···

之前那是小失误,ant环境没配置好···

BUILD FAILED
Target "D:\develop\adt-bundle-windows-x86-20140321\sdk" does not exist in the pr
oject "AndroidTest".

Total time: 2 seconds
Error running command, return code: 1
E:\cocos3.0\projects\AndroidTest>

ant环境配置好后,运行cocos run -p android 又出现新的错误···大大麻烦看下,帮忙解决一下···