Yes
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.
Android
"dependencies": {
"nativescript-mapbox": "^3.3.0",
"nativescript-theme-core": "~1.0.4",
"tns-core-modules": "~4.0.0"
}
$ tns create "my app"$ cd my\ app$ npm i --save nativescript-mapbox$ tns build androidThe 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
No
Thanks for the fix. Any work around for the time being until it's published? I have a deadline close I need to finish up.
Hey @msamprz ,
You can install the rc version of CLI, which has the fix. Just execute npm install -g nativescript@rc.
@rosen-vladimirov Thanks a lot for that, and the quick response.
I had this problem today from nowhere, but with vue-cli-template.
Unable to apply changes on device Error is: Command gradlew.bat failed with exit code 1.
The problem in mapbox but removing the mapbox only from package.json didnt help me in this case, i had to reinstall the vue-cli-template. If you have the same problem and you are using vue-cli-template, just reinstall your project and it should work.
vue init nativescript-vue/vue-cli-template <project-name>
https://github.com/nativescript-vue/vue-cli-template
I hope it will help someone 馃
Before you reinstall the template, make sure your main.js file is backed up otherwise it overwrites your main.js file and you will be mad as I was 馃憥 馃憥 馃憥
Most helpful comment
Hey @msamprz ,
You can install the
rcversion of CLI, which has the fix. Just executenpm install -g nativescript@rc.