Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-4914

Cordova CLI cannot build Android project when the path contains spaces

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.2.0
    • None
    • Platform: Windows 7
      Cordova CLI Version: 3.0.9

    Description

      When attempting to use the CLI to compile/build an android project, if the path contains spaces then the command fails.

      Example:

      C:\my path>cordova create HelloWorld com.test.helloworld "HelloWorld"
      (success)
      C:\my path> cd helloworld
      C:\my path\helloworld>cordova platform add android
      (success)
      C:\my path\helloworld>cordova prepare android
      (success)
      C:\my path\helloworld>cordova compile android
      [Error: An error occurred while building the android project. 'C:\my' is not recognized as an internal or external command, operable program or batch file.
      ]

      The same error occurs if I manually run "platforms/android/cordova/build.bat"

      However if I manually run "platforms/android/ant debug" then the build appears to succeed (at least, it gives no errors and generates an .APK file)

      Attachments

        Issue Links

          Activity

            People

              lorin.beer Lorin Beer
              thecodefish Simon Fisher
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: