Nativescript: Error is: Command ./gradlew failed with exit code 130 while tns run android

Created on 6 Dec 2017  路  6Comments  路  Source: NativeScript/NativeScript

I got suddenly encountered with below mentioned error code and cannot able to run the application in my android testing device.

^CUnable to apply changes on device: 3004c567d59f1200. Error is: Command ./gradlew failed with exit code 130.

Development environment -

  • Nativescript with angular
    *Machine - MAC
  • tns info:
    screen shot 2017-12-06 at 6 06 18 pm

Console Log-

`
Jerry-MacBook-Air:RAA Kumaran$ tns run android
Searching for devices...
Executing before-liveSync hook from /Users/Kumaran/Nativescript/Workspace/RAA/hooks/before-liveSync/nativescript-angular-sync.js
Skipping prepare.
Building project...
Gradle build...
+ applying user-defined configuration from /Users/Kumaran/Nativescript/Workspace/RAA/app/App_Resources/Android/app.gradle
+ add include.gradle from /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-bottombar/platforms/android/include.gradle
+ add include.gradle from /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-drawingpad/platforms/android/include.gradle
+ add include.gradle from /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-fancyalert/platforms/android/include.gradle
+ add include.gradle from /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-imagepicker/platforms/android/include.gradle
+ add include.gradle from /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-pro-ui/platforms/android/include.gradle
+ add include.gradle from /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-snackbar/platforms/android/include.gradle
+ creating include.gradle for plugin /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-sqlcipher
+ creating include.gradle for plugin /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/tns-core-modules-widgets
+ applying plugin configuration from /Users/Kumaran/Nativescript/Workspace/RAA/platforms/android/build/configurations/nativescript-bottombar/include.gradle
+ applying plugin configuration from /Users/Kumaran/Nativescript/Workspace/RAA/platforms/android/build/configurations/nativescript-drawingpad/include.gradle
+ applying plugin configuration from /Users/Kumaran/Nativescript/Workspace/RAA/platforms/android/build/configurations/nativescript-fancyalert/include.gradle
+ applying plugin configuration from /Users/Kumaran/Nativescript/Workspace/RAA/platforms/android/build/configurations/nativescript-imagepicker/include.gradle
+ applying plugin configuration from /Users/Kumaran/Nativescript/Workspace/RAA/platforms/android/build/configurations/nativescript-pro-ui/include.gradle
+ applying plugin configuration from /Users/Kumaran/Nativescript/Workspace/RAA/platforms/android/build/configurations/nativescript-snackbar/include.gradle
+ applying plugin configuration from /Users/Kumaran/Nativescript/Workspace/RAA/platforms/android/build/configurations/nativescript-sqlcipher/include.gradle
+ applying plugin configuration from /Users/Kumaran/Nativescript/Workspace/RAA/platforms/android/build/configurations/tns-core-modules-widgets/include.gradle
+ adding nativescript runtime package dependency: nativescript-optimized
+ adding aar plugin dependency: /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-pro-ui/platforms/android/Chart-2017.1.1030-dev-release.aar
+ adding aar plugin dependency: /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-pro-ui/platforms/android/Common-2017.1.1030-dev-release.aar
+ adding aar plugin dependency: /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-pro-ui/platforms/android/Data-2017.1.1030-dev-release.aar
+ adding aar plugin dependency: /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-pro-ui/platforms/android/Feedback-2017.1.1030-dev-release.aar
+ adding aar plugin dependency: /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-pro-ui/platforms/android/Gauges-2017.1.1030-dev-release.aar
+ adding aar plugin dependency: /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-pro-ui/platforms/android/Input-2017.1.1030-dev-release.aar
+ adding aar plugin dependency: /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-pro-ui/platforms/android/List-2017.1.1030-dev-release.aar
+ adding aar plugin dependency: /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-pro-ui/platforms/android/Primitives-2017.1.1030-dev-release.aar
+ adding aar plugin dependency: /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-sqlcipher/platforms/android/android-database-sqlcipher-3.5.7.aar
+ adding aar plugin dependency: /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/tns-core-modules-widgets/platforms/android/widgets-release.aar
^CUnable to apply changes on device: 3004c567d59f1200. Error is: Command ./gradlew failed with exit code 130.
Executing after-watch hook from /Users/Kumaran/Nativescript/Workspace/RAA/hooks/after-watch/nativescript-dev-sass.js
Executing after-watch hook from /Users/Kumaran/Nativescript/Workspace/RAA/hooks/after-watch/nativescript-dev-typescript.js
Jerry-MacBook-Air:RAA Kumaran$ tns run android
Searching for devices...
Executing before-liveSync hook from /Users/Kumaran/Nativescript/Workspace/RAA/hooks/before-liveSync/nativescript-angular-sync.js
Skipping prepare.
Building project...
Gradle build...
+ applying user-defined configuration from /Users/Kumaran/Nativescript/Workspace/RAA/app/App_Resources/Android/app.gradle
+ add include.gradle from /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-bottombar/platforms/android/include.gradle
+ add include.gradle from /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-drawingpad/platforms/android/include.gradle
+ add include.gradle from /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-fancyalert/platforms/android/include.gradle
+ add include.gradle from /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-imagepicker/platforms/android/include.gradle
+ add include.gradle from /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-pro-ui/platforms/android/include.gradle
+ add include.gradle from /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-snackbar/platforms/android/include.gradle
+ creating include.gradle for plugin /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-sqlcipher
+ creating include.gradle for plugin /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/tns-core-modules-widgets
+ applying plugin configuration from /Users/Kumaran/Nativescript/Workspace/RAA/platforms/android/build/configurations/nativescript-bottombar/include.gradle
+ applying plugin configuration from /Users/Kumaran/Nativescript/Workspace/RAA/platforms/android/build/configurations/nativescript-drawingpad/include.gradle
+ applying plugin configuration from /Users/Kumaran/Nativescript/Workspace/RAA/platforms/android/build/configurations/nativescript-fancyalert/include.gradle
+ applying plugin configuration from /Users/Kumaran/Nativescript/Workspace/RAA/platforms/android/build/configurations/nativescript-imagepicker/include.gradle
+ applying plugin configuration from /Users/Kumaran/Nativescript/Workspace/RAA/platforms/android/build/configurations/nativescript-pro-ui/include.gradle
+ applying plugin configuration from /Users/Kumaran/Nativescript/Workspace/RAA/platforms/android/build/configurations/nativescript-snackbar/include.gradle
+ applying plugin configuration from /Users/Kumaran/Nativescript/Workspace/RAA/platforms/android/build/configurations/nativescript-sqlcipher/include.gradle
+ applying plugin configuration from /Users/Kumaran/Nativescript/Workspace/RAA/platforms/android/build/configurations/tns-core-modules-widgets/include.gradle
+ adding nativescript runtime package dependency: nativescript-optimized
+ adding aar plugin dependency: /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-pro-ui/platforms/android/Chart-2017.1.1030-dev-release.aar
+ adding aar plugin dependency: /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-pro-ui/platforms/android/Common-2017.1.1030-dev-release.aar
+ adding aar plugin dependency: /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-pro-ui/platforms/android/Data-2017.1.1030-dev-release.aar
+ adding aar plugin dependency: /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-pro-ui/platforms/android/Feedback-2017.1.1030-dev-release.aar
+ adding aar plugin dependency: /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-pro-ui/platforms/android/Gauges-2017.1.1030-dev-release.aar
+ adding aar plugin dependency: /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-pro-ui/platforms/android/Input-2017.1.1030-dev-release.aar
+ adding aar plugin dependency: /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-pro-ui/platforms/android/List-2017.1.1030-dev-release.aar
+ adding aar plugin dependency: /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-pro-ui/platforms/android/Primitives-2017.1.1030-dev-release.aar
+ adding aar plugin dependency: /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/nativescript-sqlcipher/platforms/android/android-database-sqlcipher-3.5.7.aar
+ adding aar plugin dependency: /Users/Kumaran/Nativescript/Workspace/RAA/node_modules/tns-core-modules-widgets/platforms/android/widgets-release.aar

Please suggest!

android

Most helpful comment

Hi @kumaran-dena,
Could you verify if there is enough space on the device or simulator, which you are using for testing?
Also, you could try the following steps:

  1. tns platform remove android
  2. rm -rf node_modules
  3. npm install
  4. tns platform add android
  5. tns run android

If the problem still persists, please build the project with tns run android --log trace and send us the full log from the terminal. It would also help if you could send us the project, which could be debugged locally on our side.

All 6 comments

Hi @kumaran-dena,
Could you verify if there is enough space on the device or simulator, which you are using for testing?
Also, you could try the following steps:

  1. tns platform remove android
  2. rm -rf node_modules
  3. npm install
  4. tns platform add android
  5. tns run android

If the problem still persists, please build the project with tns run android --log trace and send us the full log from the terminal. It would also help if you could send us the project, which could be debugged locally on our side.

Hi @tsonevn,
Within hour i got it back as workable state by simply done the below mentioned workarounds,

  • close the vs code workspace and reopen
  • uninstall the app form testing device then rebuild the project
  • tns build android
  • tns run android

But may i know why that error occurred?

This issue could be related to some processes that are kept alive. In this case, build process could fail.
However, this is the only assumption. 孝o be sure that this is the case, we will need steps, which allow us to recreate this behavior.

I used to get this while trying to build android with this plugin added https://github.com/davecoffin/nativescript-modal-datetimepicker
i only had the issue with android, the fix was to install https://developer.android.com/ndk/
which is needed for plugins that uses c/c++

Hi @mhmo91,
Thank you for the provided info.
I would suggest contacting the plugin's author while logging a new issue for including this information in the plugin's README file.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings