title: Unable to apply changes on device: DEVICE####. Error is: Cannot read property 'env' of undefined
body: <p>I get this issue after my first android build; then, before that, the project run in development in the device and even in an emulator. Also the error happens in the emulator too.</p>
  
  <p>I has been researching about that. Update to the current last versions of NativeScript <code>tns-android: 5.4.0</code> <code>tns-core-modules: 5.4.3</code> <code>nativescript-vue: 2.2.2</code>, also update the firebase plugin <code>nativescript-plugin-firebase: 9.0.1</code>. And this doesn’t allows me to continue the project. I am so frustrated in this moment about this issue.</p>
  
  <pre class="lang-sh prettyprint-override"><code>Unable to apply changes on device: DEVICE####. 
  Error is: Cannot read property 'env' of undefined.
  </code></pre>
  
  <p>Using the <code>--log trace</code> this is shown</p>
  
  <pre class="lang-sh prettyprint-override"><code>Will emit event liveSyncError with data { error:
     { Error: Command ./gradlew failed with exit code 1
  at Errors.fail (/Users/user/.nvm/versions/node/v8.14.1/lib/node_modules/nativescript/lib/common/errors.js:126:28)
      at Errors.failWithoutHelp (/Users/user/.nvm/versions/node/v8.14.1/lib/node_modules/nativescript/lib/common/errors.js:136:21)
      at AndroidProjectService.&lt;anonymous&gt; (/Users/user/.nvm/versions/node/v8.14.1/lib/node_modules/nativescript/lib/services/android-project-service.js:666:34)
      at Generator.throw (&lt;anonymous&gt;)
      at rejected (/Users/user/.nvm/versions/node/v8.14.1/lib/node_modules/nativescript/lib/services/android-project-service.js:11:65)
      at &lt;anonymous&gt;
      at process._tickCallback (internal/process/next_tick.js:189:7)
       name: 'Exception',
       message: 'Command ./gradlew failed with exit code 1',
       stack: 'Error: Command ./gradlew failed with exit code 1\n    at Errors.fail (/Users/user/.nvm/versions/node/v8.14.1/lib/node_modules/nativescript/lib/common/errors.js:126:28)\n    at Errors.failWithoutHelp (/Users/user/.nvm/versions/node/v8.14.1/lib/node_modules/nativescript/lib/common/errors.js:136:21)\n    at AndroidProjectService.&lt;anonymous&gt; (/Users/user/.nvm/versions/node/v8.14.1/lib/node_modules/nativescript/lib/services/android-project-service.js:666:34)\n    at Generator.throw (&lt;anonymous&gt;)\n    at rejected (/Users/user/.nvm/versions/node/v8.14.1/lib/node_modules/nativescript/lib/services/android-project-service.js:11:65)\n    at &lt;anonymous&gt;\n    at process._tickCallback (internal/process/next_tick.js:189:7)',
       errorCode: 127,
       suppressCommandHelp: true,
       proxyAuthenticationRequired: false,
       printOnStdout: undefined },
  .
  .
  .
  
  </code></pre>
  
  <p>Thanks in advance for any help, this has totally block the development of the project.</p>