My project is cocos2d-x-3.7.1 project, with the command line (Cocos run-p Android) when packaging the error:
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 "'
Workaround:
Enter the Cocos2d-x-3.7.1\tools\cocos2d-console\plugins\project_compile directory. Locate the build_android.py file, open it with the Edit tool,
Locate the following code location (the location in this version is 439 lines):
Command = "%s clean%s-f%s-dsdk.dir=%s"% (Cocos. Cmdrunner.convert_path_to_cmd (Ant_path), Build_mode, Buildfile_path, Cocos. Cmdrunner.convert_path_to_cmd (Self.sdk_root))
Modified to:
Command = "%s clean%s-f%s-dsdk.dir=%s"% (Cocos. Cmdrunner.convert_path_to_cmd (Ant_path), Build_mode, Buildfile_path, Self.sdk_root)
In fact, self.sdk_root outside the packaging (so call it) to remove.
Compile it again!
If you want to specify a compiled Android version:
Cocos run-p Android--ap android-10
(AP front is 2-, remember)
Cocos run-p Android Error: File name, directory name volume banner method is incorrect