Skip to content

Android build fails when path to app has space and plugin should be build #3560

Closed
@rosen-vladimirov

Description

@rosen-vladimirov

Did you verify this is a real problem by searching the NativeScript Forum and the other open issues in this repo?

Yes

Tell us about the problem

Android build fails in case the path to project has space and the project has a plugin that should be build. For example, in case you have nativescript-mapbox as a dependency and you place your project in a directory which has space in its name, the build/run commands will fail as CLI is unable to build the plugin.

Which platform(s) does your issue occur on?

Android

Please provide the following version numbers that your issue occurs with:

  • CLI: 4.0.0
  • Cross-platform modules: Not applicable
  • Runtime(s): Not applicable
  • Plugin(s):
"dependencies": {
        "nativescript-mapbox": "^3.3.0",
        "nativescript-theme-core": "~1.0.4",
        "tns-core-modules": "~4.0.0"
}

Please tell us how to recreate the issue in as much detail as possible.

  1. Create application with space in the name: $ tns create "my app"
  2. Navigate to the app: $ cd my\ app
  3. Add nativescript-mapbox plugin: $ npm i --save nativescript-mapbox
  4. Try building the application for android: $ tns build android

The build will fail with error:

Failed to build plugin nativescript-mapbox :
Error: Command failed: gradlew.bat -p D:\Work\nativescript-cli\scratch\my app\platforms\tempPlugin\nativescript_mapbox assembleRelease -PcompileSdk=android-27 -PbuildToolsVersion=27.0.3 -PsupportVersion=26.0.0-alpha1

FAILURE: Build failed with an exception.

* What went wrong:
The specified project directory 'D:\Work\nativescript-cli\scratch\my' does not exist.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 9s

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

No

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions