question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Release Build Android error: gradlew.bat failed with exit code 1 When Path contains Space

See original GitHub issue

@AmilaRukshan commented on Thu Mar 16 2017

Hi, When building my project for Release I noticed a build error: /gradlew.bat failed with exit code 1.i think that because my project path contains Space. if there is not space in the path release build is working properly.

Try to find any similar issues at stackoverflow.com or other websites can’t find any.

cmd

error

Version numbers: tns: 2.5.2 Cross-platform modules: 2.5.0 Package.json of project:

{
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "readme": "NativeScript Application",
  "repository": "<fill-your-repository-here>",
  "nativescript": {
    "id": "org.nativescript.HelloWorld",
    "tns-android": {
      "version": "2.5.0"
    }
  },
  "dependencies": {
    "@angular/common": "2.4.3",
    "@angular/compiler": "2.4.3",
    "@angular/core": "2.4.3",
    "@angular/forms": "2.4.3",
    "@angular/http": "2.4.3",
    "@angular/platform-browser": "2.4.3",
    "@angular/platform-browser-dynamic": "2.4.3",
    "@angular/router": "3.4.3",
    "nativescript-angular": "1.4.0",
    "nativescript-angular-snapshot": "1.4.0-5.5.372.32-1",
    "nativescript-theme-core": "~1.0.2",
    "reflect-metadata": "~0.1.8",
    "rxjs": "~5.0.1",
    "tns-core-modules": "2.5.0"
  },
  "devDependencies": {
    "babel-traverse": "6.4.5",
    "babel-types": "6.4.5",
    "babylon": "6.4.5",
    "lazy": "1.0.11",
    "nativescript-dev-android-snapshot": "^0.*.*",
    "nativescript-dev-typescript": "^0.3.5",
    "typescript": "~2.1.0",
    "zone.js": "~0.7.2"
  }
}

–log trace output:

execFile: E:\Program Files (x86)\Android\android-sdk\platform-tools\adb "help"
execFile: E:\Program Files (x86)\Android\android-sdk\platform-tools\adb "help"
spawn: E:\Program Files (x86)\Android\android-sdk\platform-tools\adb "--help"
Socket {
  _connecting: false,
  _hadError: false,
  _handle: 
   Pipe {
     _externalStream: {},
     fd: -1,
     writeQueueSize: 0,
     owner: [Circular],
     onread: [Function: onread],
     reading: true },
  _parent: null,
  _host: null,
  _readableState: 
   ReadableState {
     objectMode: false,
     highWaterMark: 16384,
     buffer: [],
     length: 0,
     pipes: null,
     pipesCount: 0,
     flowing: null,
     ended: false,
     endEmitted: false,
     reading: true,
     sync: false,
     needReadable: true,
     emittedReadable: false,
     readableListening: false,
     resumeScheduled: false,
     defaultEncoding: 'utf8',
     ranOut: false,
     awaitDrain: 0,
     readingMore: false,
     decoder: null,
     encoding: null },
  readable: true,
  domain: null,
  _events: 
   { end: { [Function: g] listener: [Function: onend] },
     finish: [Function: onSocketFinish],
     _socketEnd: [Function: onSocketEnd],
     close: [Function] },
  _eventsCount: 4,
  _maxListeners: undefined,
  _writableState: 
   WritableState {
     objectMode: false,
     highWaterMark: 16384,
     needDrain: false,
     ending: false,
     ended: false,
     finished: false,
     decodeStrings: false,
     defaultEncoding: 'utf8',
     length: 0,
     writing: false,
     corked: 0,
     sync: true,
     bufferProcessing: false,
     onwrite: [Function],
     writecb: null,
     writelen: 0,
     bufferedRequest: null,
     lastBufferedRequest: null,
     pendingcb: 0,
     prefinished: false,
     errorEmitted: false,
     bufferedRequestCount: 0,
     corkedRequestsFree: CorkedRequest { next: [Object], entry: null, finish: [Function] } },
  writable: false,
  allowHalfOpen: false,
  destroyed: false,
  bytesRead: 0,
  _bytesDispatched: 0,
  _sockname: null,
  _writev: null,
  _pendingData: null,
  _pendingEncoding: '',
  server: null,
  _server: null }
Exec npm -v 
 stdout: 3.10.8
 
 stderr: 
spawn: java "-version"
Exec node-gyp -v 
 stdout:  
 stderr: 'node-gyp' is not recognized as an internal or external command,
operable program or batch file.

Exec "E:\Program Files (x86)\Android\android-sdk\platform-tools\adb" version 
 stdout: Android Debug Bridge version 1.0.36
Revision 0e9850346394-android
 
 stderr: 
spawn: E:\Program Files (x86)\Android\android-sdk\tools\android.bat "-h"
Result when throw error is false:
{ stdout: '\n       Usage:\n       android [global options] action [action options]\n       Global options:\n  -s --silent     : Silent mode, shows errors only.\n  -v --verbose    : Verbose mode, shows errors, warnings and all messages.\n     --clear-cache: Clear the SDK Manager repository manifest cache.\n  -h --help       : Help on a specific command.\n\n                                                                    Valid\n                                                                    actions\n                                                                    are\n                                                                    composed\n                                                                    of a verb\n                                                                    and an\n                                                                    optional\n                                                                    direct\n                                                                    object:\n-    sdk              : Displays the SDK Manager window.\n-    avd              : Displays the AVD Manager window.\n-   list              : Lists existing targets or virtual devices.\n-   list avd          : Lists existing Android Virtual Devices.\n-   list target       : Lists existing targets.\n-   list device       : Lists existing devices.\n-   list sdk          : Lists remote SDK repository.\n- create avd          : Creates a new Android Virtual Device.\n-   move avd          : Moves or renames an Android Virtual Device.\n- delete avd          : Deletes an Android Virtual Device.\n- update avd          : Updates an Android Virtual Device to match the folders\n                        of a new SDK.\n- create project      : Creates a new Android project.\n- update project      : Updates an Android project (must already have an\n                        AndroidManifest.xml).\n- create test-project : Creates a new Android project for a test package.\n- update test-project : Updates the Android project for a test package (must\n                        already have an AndroidManifest.xml).\n- create lib-project  : Creates a new Android library project.\n- update lib-project  : Updates an Android library project (must already have\n                        an AndroidManifest.xml).\n- create uitest-project: Creates a new UI test project.\n- update adb          : Updates adb to support the USB devices declared in the\n                        SDK add-ons.\n- update sdk          : Updates the SDK by suggesting new platforms to install\n                        if available.\n',
  stderr: '',
  exitCode: 0 }
Exec mono --version 
 stdout:  
 stderr: 'mono' is not recognized as an internal or external command,
operable program or batch file.

Exec git --version 
 stdout: git version 2.10.0.windows.1
 
 stderr: 
Exec gradle -v 
 stdout:  
 stderr: 'gradle' is not recognized as an internal or external command,
operable program or batch file.

Exec "C:\Program Files\Java\jdk1.8.0_112\bin\javac" -version 
 stdout:  
 stderr: javac 1.8.0_112

System information:
{ procInfo: 'nativescript/2.5.2',
  platform: 'win32',
  os: 'Windows 10 Pro 6.3.14393',
  shell: 'C:\\WINDOWS\\system32\\cmd.exe',
  dotNetVer: '4.6.01586',
  procArch: 'x64',
  nodeVer: 'v5.10.0',
  npmVer: '3.10.8',
  javaVer: '1.8.0',
  nodeGypVer: null,
  xcodeVer: null,
  xcodeprojGemLocation: null,
  itunesInstalled: false,
  cocoapodVer: null,
  adbVer: 'Android Debug Bridge version 1.0.36',
  androidInstalled: true,
  monoVer: null,
  gitVer: '2.10.0.windows.1',
  gradleVer: null,
  javacVersion: '1.8.0_112' }
Starting watch on killswitch C:\Users\User\AppData\Local\Temp\User\KillSwitches\cli
Initializing analytics statuses.
Analytics statuses: 
{ TrackFeatureUsage: 1, TrackExceptions: 1 }
Trying to track feature 'Non-interactive' with value 'build'.
Looking for project in 'E:\Nativescript\Sample Project\HelloWorld'
Project directory is 'E:\Nativescript\Sample Project\HelloWorld'.
Validate options for platform: Android
Analytics statuses: 
{ TrackFeatureUsage: 1, TrackExceptions: 1 }
Trying to track feature 'Non-interactive' with value 'build|android'.
Analytics statuses: 
{ TrackFeatureUsage: 1, TrackExceptions: 1 }
Trying to track feature 'Working with project type' with value 'Angular'.
Changes info in prepare platform: ProjectChangesInfo {
  appFilesChanged: true,
  packageChanged: true,
  appResourcesChanged: true,
  nativeChanged: true,
  modulesChanged: true,
  configChanged: true }
spawn: E:\Nativescript\Sample Project\HelloWorld\platforms\android\gradlew.bat "clean"

:config phase:  createDefaultIncludeFiles

:config phase:  copyAarDependencies

:config phase:  addAarDependencies
	+adding dependency: E:\Nativescript\Sample Project\HelloWorld\platforms\android\libs\aar\widgets-release.aar
Incremental java compilation is an incubating feature.
:asbg:clean UP-TO-DATE
:deleteMetadata
:deleteFlavors
:deleteConfigurations UP-TO-DATE
:clean

BUILD SUCCESSFUL

Total time: 13.538 secs
Hooks directories: [ 'C:\\Users\\User\\AppData\\Roaming\\npm\\node_modules\\nativescript\\lib\\hooks',
  'C:\\Users\\User\\AppData\\Roaming\\npm\\node_modules\\nativescript\\lib\\common\\hooks',
  'E:\\Nativescript\\Sample Project\\HelloWorld\\hooks' ]
BeforeHookName for command prepare is before-prepare
Executing before-prepare hook from E:\Nativescript\Sample Project\HelloWorld\hooks\before-prepare\nativescript-dev-android-snapshot.js
Executing before-prepare hook at location E:\Nativescript\Sample Project\HelloWorld\hooks\before-prepare\nativescript-dev-android-snapshot.js in-process
Validating before-prepare arguments.
Hook completed
Executing before-prepare hook from E:\Nativescript\Sample Project\HelloWorld\hooks\before-prepare\nativescript-dev-typescript.js
Executing before-prepare hook at location E:\Nativescript\Sample Project\HelloWorld\hooks\before-prepare\nativescript-dev-typescript.js in-process
Validating before-prepare arguments.
Found peer TypeScript 2.1.6
C:\Program Files\nodejs\node.exe --max_old_space_size=4096 E:\Nativescript\Sample Project\HelloWorld\node_modules\typescript\lib\tsc.js --project E:\Nativescript\Sample Project\HelloWorld
Hook promises to signal completion
Hook completed
Preparing project...
spawn: node "E:\Nativescript\Sample Project\HelloWorld\platforms\android\build-tools\check-v8-dependants.js" "[{"name":"@angular/common","directory":"E:\\Nativescript\\Sample Project\\HelloWorld\\node_modules\\@angular\\common","depth":0},{"name":"@angular/compiler","directory":"E:\\Nativescript\\Sample Project\\HelloWorld\\node_modules\\@angular\\compiler","depth":0},{"name":"@angular/core","directory":"E:\\Nativescript\\Sample Project\\HelloWorld\\node_modules\\@angular\\core","depth":0},{"name":"@angular/forms","directory":"E:\\Nativescript\\Sample Project\\HelloWorld\\node_modules\\@angular\\forms","depth":0},{"name":"@angular/http","directory":"E:\\Nativescript\\Sample Project\\HelloWorld\\node_modules\\@angular\\http","depth":0},{"name":"@angular/platform-browser","directory":"E:\\Nativescript\\Sample Project\\HelloWorld\\node_modules\\@angular\\platform-browser","depth":0},{"name":"@angular/platform-browser-dynamic","directory":"E:\\Nativescript\\Sample Project\\HelloWorld\\node_modules\\@angular\\platform-browser-dynamic","depth":0},{"name":"@angular/router","directory":"E:\\Nativescript\\Sample Project\\HelloWorld\\node_modules\\@angular\\router","depth":0},{"name":"nativescript-angular","directory":"E:\\Nativescript\\Sample Project\\HelloWorld\\node_modules\\nativescript-angular","depth":0,"nativescript":{}},{"name":"nativescript-intl","directory":"E:\\Nativescript\\Sample Project\\HelloWorld\\node_modules\\nativescript-intl","depth":0,"nativescript":{"platforms":{"android":"2.3.0","ios":"2.3.0"}}},{"name":"parse5","directory":"E:\\Nativescript\\Sample Project\\HelloWorld\\node_modules\\parse5","depth":0},{"name":"punycode","directory":"E:\\Nativescript\\Sample Project\\HelloWorld\\node_modules\\punycode","depth":0},{"name":"querystring","directory":"E:\\Nativescript\\Sample Project\\HelloWorld\\node_modules\\querystring","depth":0},{"name":"reflect-metadata","directory":"E:\\Nativescript\\Sample Project\\HelloWorld\\node_modules\\reflect-metadata","depth":0},{"name":"rxjs","directory":"E:\\Nativescript\\Sample Project\\HelloWorld\\node_modules\\rxjs","depth":0},{"name":"symbol-observable","directory":"E:\\Nativescript\\Sample Project\\HelloWorld\\node_modules\\symbol-observable","depth":0},{"name":"url","directory":"E:\\Nativescript\\Sample Project\\HelloWorld\\node_modules\\url","depth":0},{"name":"nativescript-angular-snapshot","directory":"E:\\Nativescript\\Sample Project\\HelloWorld\\node_modules\\nativescript-angular-snapshot","depth":0,"nativescript":{"platforms":{"android":"2.0.0"}}},{"name":"nativescript-theme-core","directory":"E:\\Nativescript\\Sample Project\\HelloWorld\\node_modules\\nativescript-theme-core","depth":0,"nativescript":{"platforms":{"ios":"2.4.0","android":"2.4.0"}}},{"name":"tns-core-modules","directory":"E:\\Nativescript\\Sample Project\\HelloWorld\\node_modules\\tns-core-modules","depth":0,"nativescript":{"platforms":{"ios":"2.1.1","android":"2.1.1"}}},{"name":"tns-core-modules-widgets","directory":"E:\\Nativescript\\Sample Project\\HelloWorld\\node_modules\\tns-core-modules-widgets","depth":0,"nativescript":{"platforms":{"ios":"2.0.0","android":"2.0.0"}}}]" "E:\Nativescript\Sample Project\HelloWorld\platforms"
spawn: E:\Program Files (x86)\Android\android-sdk\tools\android.bat "list" "targets"
Result when throw error is false:
{ stdout: 'Available Android targets:\n----------\nid: 1 or "android-19"\n     Name: Android 4.4.2\n     Type: Platform\n     API level: 19\n     Revision: 4\n     Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in\n Tag/ABIs : default/armeabi-v7a, default/x86\n----------\nid: 2 or "android-21"\n     Name: Android 5.0.1\n     Type: Platform\n     API level: 21\n     Revision: 2\n     Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in\n Tag/ABIs : no ABIs.\n----------\nid: 3 or "android-23"\n     Name: Android 6.0\n     Type: Platform\n     API level: 23\n     Revision: 3\n     Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in\n Tag/ABIs : default/x86\n----------\nid: 4 or "android-24"\n     Name: Android 7.0\n     Type: Platform\n     API level: 24\n     Revision: 2\n     Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in\n Tag/ABIs : default/arm64-v8a, default/armeabi-v7a, default/x86, default/x86_64\n----------\nid: 5 or "android-25"\n     Name: Android 7.1.1\n     Type: Platform\n     API level: 25\n     Revision: 2\n     Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in\n Tag/ABIs : no ABIs.\n----------\nid: 6 or "Google Inc.:Google APIs:19"\n     Name: Google APIs\n     Type: Add-On\n     Vendor: Google Inc.\n     Revision: 20\n     Description: Android + Google APIs\n     Based on Android 4.4.2 (API level 19)\n     Libraries:\n      * com.android.future.usb.accessory (usb.jar)\n          API for USB Accessories\n      * com.google.android.media.effects (effects.jar)\n          Collection of video effects\n      * com.google.android.maps (maps.jar)\n          API for Google Maps\n     Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in\n Tag/ABIs : no ABIs.\n----------\nid: 7 or "Google Inc.:Google APIs:23"\n     Name: Google APIs\n     Type: Add-On\n     Vendor: Google Inc.\n     Revision: 1\n     Description: Android + Google APIs\n     Based on Android 6.0 (API level 23)\n     Libraries:\n      * com.android.future.usb.accessory (usb.jar)\n          API for USB Accessories\n      * com.google.android.media.effects (effects.jar)\n          Collection of video effects\n      * com.google.android.maps (maps.jar)\n          API for Google Maps\n     Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in\n Tag/ABIs : google_apis/armeabi-v7a, google_apis/x86\n',
  stderr: '',
  exitCode: 0 }
Available Android targets:
----------
id: 1 or "android-19"
     Name: Android 4.4.2
     Type: Platform
     API level: 19
     Revision: 4
     Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in
 Tag/ABIs : default/armeabi-v7a, default/x86
----------
id: 2 or "android-21"
     Name: Android 5.0.1
     Type: Platform
     API level: 21
     Revision: 2
     Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in
 Tag/ABIs : no ABIs.
----------
id: 3 or "android-23"
     Name: Android 6.0
     Type: Platform
     API level: 23
     Revision: 3
     Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in
 Tag/ABIs : default/x86
----------
id: 4 or "android-24"
     Name: Android 7.0
     Type: Platform
     API level: 24
     Revision: 2
     Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in
 Tag/ABIs : default/arm64-v8a, default/armeabi-v7a, default/x86, default/x86_64
----------
id: 5 or "android-25"
     Name: Android 7.1.1
     Type: Platform
     API level: 25
     Revision: 2
     Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in
 Tag/ABIs : no ABIs.
----------
id: 6 or "Google Inc.:Google APIs:19"
     Name: Google APIs
     Type: Add-On
     Vendor: Google Inc.
     Revision: 20
     Description: Android + Google APIs
     Based on Android 4.4.2 (API level 19)
     Libraries:
      * com.android.future.usb.accessory (usb.jar)
          API for USB Accessories
      * com.google.android.media.effects (effects.jar)
          Collection of video effects
      * com.google.android.maps (maps.jar)
          API for Google Maps
     Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in
 Tag/ABIs : no ABIs.
----------
id: 7 or "Google Inc.:Google APIs:23"
     Name: Google APIs
     Type: Add-On
     Vendor: Google Inc.
     Revision: 1
     Description: Android + Google APIs
     Based on Android 6.0 (API level 23)
     Libraries:
      * com.android.future.usb.accessory (usb.jar)
          API for USB Accessories
      * com.google.android.media.effects (effects.jar)
          Collection of video effects
      * com.google.android.maps (maps.jar)
          API for Google Maps
     Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in
 Tag/ABIs : google_apis/armeabi-v7a, google_apis/x86

Directories found in E:\Program Files (x86)\Android\android-sdk\build-tools are 19.1.0, 21.1.2, 23.0.1, 23.0.2, 23.0.3, 24.0.0, 24.0.2, 25.0.2
Versions found in E:\Program Files (x86)\Android\android-sdk\build-tools are 19.1.0, 21.1.2, 23.0.1, 23.0.2, 23.0.3, 24.0.0, 24.0.2, 25.0.2
Selected version is:  25.0.2
Selected targetSdk is: 25
Directories found in E:\Program Files (x86)\Android\android-sdk\extras\android\m2repository\com\android\support\appcompat-v7 are 18.0.0, 19.0.0, 19.0.1, 19.1.0, 20.0.0, 21.0.0, 21.0.2, 21.0.3, 22.0.0, 22.1.0, 22.1.1, 22.2.0, 22.2.1, 23.0.0, 23.0.1, 23.1.0, 23.1.1, 23.2.0, 23.2.1, 23.3.0, 23.4.0, 24.0.0, 24.0.0-alpha1, 24.0.0-alpha2, 24.0.0-beta1, 24.1.0, 24.1.1, 24.2.0, 24.2.1, 25.0.0, 25.0.1, 25.1.0, 25.1.1, 25.2.0, maven-metadata.xml, maven-metadata.xml.md5, maven-metadata.xml.sha1
Versions found in E:\Program Files (x86)\Android\android-sdk\extras\android\m2repository\com\android\support\appcompat-v7 are 18.0.0, 19.0.0, 19.0.1, 19.1.0, 20.0.0, 21.0.0, 21.0.2, 21.0.3, 22.0.0, 22.1.0, 22.1.1, 22.2.0, 22.2.1, 23.0.0, 23.0.1, 23.1.0, 23.1.1, 23.2.0, 23.2.1, 23.3.0, 23.4.0, 24.0.0, 24.0.0, 24.0.0, 24.0.0, 24.1.0, 24.1.1, 24.2.0, 24.2.1, 25.0.0, 25.0.1, 25.1.0, 25.1.1, 25.2.0
Selected version is:  25.2.0
Selected AppCompat version is: 25.2.0
spawn: E:\Nativescript\Sample Project\HelloWorld\platforms\android\gradlew.bat "clean" "-PcompileSdk=android-25" "-PtargetSdk=__APILEVEL__" "-PbuildToolsVersion=25.0.2" "-PsupportVersion=25.2.0" "-PgenerateTypings=false" "-Prelease" "-PksPath=E:\Nativescript\Sample Project\HelloWorld\config\app-release-key.jks" "-Palias=app-release-key" "-Ppassword=*****************************************
[Error: Command E:\Nativescript\Sample Project\HelloWorld\platforms\android\gradlew.bat failed with exit code 1]
Error: Command E:\Nativescript\Sample Project\HelloWorld\platforms\android\gradlew.bat failed with exit code 1
    at FiberFuture.Future.wait (C:\Users\User\AppData\Roaming\npm\node_modules\nativescript\node_modules\fibers\future.js:566:15)
    at C:\Users\User\AppData\Roaming\npm\node_modules\nativescript\lib\services\platform-service.js:279:116
    at Function.settle (C:\Users\User\AppData\Roaming\npm\node_modules\nativescript\node_modules\fibers\future.js:249:26)
    at FiberFuture.Future.wait (C:\Users\User\AppData\Roaming\npm\node_modules\nativescript\node_modules\fibers\future.js:565:10)
    at C:\Users\User\AppData\Roaming\npm\node_modules\nativescript\lib\services\platform-service.js:231:47
    at Function.settle (C:\Users\User\AppData\Roaming\npm\node_modules\nativescript\node_modules\fibers\future.js:249:26)
    at FiberFuture.Future.wait (C:\Users\User\AppData\Roaming\npm\node_modules\nativescript\node_modules\fibers\future.js:565:10)
    at C:\Users\User\AppData\Roaming\npm\node_modules\nativescript\lib\common\helpers.js:253:36
    at PlatformService.descriptor.value (C:\Users\User\AppData\Roaming\npm\node_modules\nativescript\lib\common\helpers.js:219:24)
    at C:\Users\User\AppData\Roaming\npm\node_modules\nativescript\lib\services\platform-service.js:191:22
    - - - - -
    at ChildProcess.<anonymous> (C:\Users\User\AppData\Roaming\npm\node_modules\nativescript\lib\common\child-process.js:89:38)
    at emitTwo (events.js:100:13)
    at ChildProcess.emit (events.js:185:7)
    at maybeClose (internal/child_process.js:850:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
Processing node_modules failed. Error: Command E:\Nativescript\Sample Project\HelloWorld\platforms\android\gradlew.bat failed with exit code 1
Analytics statuses: 
{ TrackFeatureUsage: 1, TrackExceptions: 1 }
Trying to track exception with message 'Processing node_modules failed. Error: Command E:\Nativescript\Sample Project\HelloWorld\platforms\android\gradlew.bat failed with exit code 1'.


@Pip3r4o commented on Fri Mar 17 2017

Hey @AmilaRukshan

I managed to reproduce the same crash when building in release. I found that passing a relative/absolute path (both resolve to full paths) with whitespace(s) in it to the --key-store-path argument will cause the errors.

The current workaround is to use a keystore file from a path that doesn’t contain whitespaces.


@AmilaRukshan commented on Sat Mar 18 2017

Thanks a lot @Pip3r4o .i tried your workaround its works for me.


@Pip3r4o commented on Fri Mar 24 2017

A fix will be available in the upcoming 3.0 NativeScript version.

https://github.com/NativeScript/nativescript-cli/pull/2648

Thanks for using NativeScript!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Khadrealcommented, Sep 28, 2017

Thank you @Pip3r4o, I found the issue myself. I was using float for version code instead of integer.

Thanks

1reaction
petekanevcommented, Sep 28, 2017

@Khadreal we’d need the complete log to be able to determine the reason for the build exception. Please run tns run android --log DEBUG and share the logs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

gradlew.bat failed with exit code 1 - nativescript - Stack Overflow
It seems some files missing in platform -> android folder. I fixed this issue by removing the android platform and adding it again...
Read more >
flutter could not find or load main class org.gradle.wrapper ...
GradleWrapperMain this error and Exception: Gradle task assembleDebug failed with exit code 1 and this exception. Also, I'm new to flutter.
Read more >
Gradlew.Bat Failed With Exit Code 1 - ADocLib
bat failed with exit code 1.i think that because my project path contains Space. if there is not space in the path release...
Read more >
Command-Line Interface - Gradle User Manual
gradlew or gradlew.bat for gradle in all following examples when using the Wrapper. ... These include the build , assemble , and check...
Read more >
gradlew build failed in Devops pipeline
Get more help at https://help.gradle.org BUILD FAILED in 10s Error: The process '/home/vsts/work/1/s/gradlew' failed with exit code 1 at ExecState.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found