[ https://issues.apache.org/jira/browse/CB-5950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13886818#comment-13886818 ]
Jon Watte commented on CB-5950: ------------------------------- I tracked this down, and the problem is actually in the latest Android SDK. The fix is in the Android SDK: At the bottom of platform-tools\18.0.1\dx.bat, change: call %java_exe% %javaOpts% -Djava.ext.dirs=%frameworkdir% -jar %jarpath% %params% to call "%java_exe%" %javaOpts% -Djava.ext.dirs=%frameworkdir% -jar %jarpath% %params% > Android build on Windows fails with spaces in "\Program Files" > -------------------------------------------------------------- > > Key: CB-5950 > URL: https://issues.apache.org/jira/browse/CB-5950 > Project: Apache Cordova > Issue Type: Bug > Components: Android > Affects Versions: 3.3.0 > Environment: Windows 8.1 > Reporter: Jon Watte > > I downloaded and installed the latest nodejs for Windows (0.10.25,) latest > JDK (1.7.0_51), latest Android SDK (19), and latest apache-ant (1.9.3) and > created a new project as per the quickstart instructions. > Creating the project and adding the android platform works fine. > However, "cordova build" fails with an error: > Generating config.xml from defaults for platform "android" > Preparing android project > Compiling app on platform "android" via command "cmd" /c > C:\IMVU\example\example\platforms\android\cordova\build > C:\Users\jwatte\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:126 > throw e; > ^ > Error: An error occurred while building the android project.Error executing > "ant debug -f "C:\IMVU\example\example\platforms\android\build.xml"": > BUILD FAILED > C:\code\android-sdks\tools\ant\build.xml:892: The following error occurred > while executing this line: > C:\code\android-sdks\tools\ant\build.xml:894: The following error occurred > while executing this line: > C:\code\android-sdks\tools\ant\build.xml:906: The following error occurred > while executing this line: > C:\code\android-sdks\tools\ant\build.xml:284: null returned: 1 > Total time: 3 seconds > at ChildProcess.<anonymous> > (C:\Users\jwatte\AppData\Roaming\npm\node_modules\cordova\src\compile.js:65:22) > at ChildProcess.EventEmitter.emit (events.js:98:17) > at maybeClose (child_process.js:743:16) > at Socket.<anonymous> (child_process.js:956:11) > at Socket.EventEmitter.emit (events.js:95:17) > at Pipe.close (net.js:466:12) > C:\IMVU\example\example> > Running the build file manually prints some more information; the error > happens when trying to run "dx" and it claims "C:\Program" is not an internal > or external command. > There are many previous bugs about "doesn't work with spaces in paths," so > this seems like a regression. Spaces in paths are a fact of live on Windows, > as is to dorky quoting rules for COMMAND.COM, so it would seem that a basic > acceptance test that tests everything with the latest of all the dependencies > on an otherwise fresh system should catch these things. If Windows is an > important host for cordova developers, perhaps that would be a worthwhile > investment? -- This message was sent by Atlassian JIRA (v6.1.5#6160)