triniwiz / nativescript-downloader

Apache License 2.0
32 stars 18 forks source link

Error is: Command ./gradlew failed with exit code 1 #18

Closed Darahat closed 5 years ago

Darahat commented 6 years ago

I am using vue-cli template to make a wallpaper app.After installing nativescript downloader i trying to debug it using npm run debug:android command.but it shows error.

Error Log

wallpaper@1.0.0 debug:android /home/darahat/Desktop/Wallpaper
 npm run debug -- --env.android

 wallpaper@1.0.0 debug /home/darahat/Desktop/Wallpaper
 webpack --watch --env.tnsAction debug "--env.android"

info: Copying NativeScript plugins to template dependencies...
info: Preparing NativeScript application from template...
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN wallpaper@ No repository field.

info: Bundling application for android...

Webpack is watching the files…

Executing post-build scripts
info: Debugging NativeScript application...
Searching for devices...
Copying template files...
Installing tns-android
+ tns-android@4.0.1
added 1 package in 3.646s
Project successfully created.
Preparing project...
Successfully prepared plugin nativescript-cardview for android.
Successfully prepared plugin nativescript-downloader for android.
Successfully prepared plugin nativescript-theme-core for android.
Successfully prepared plugin nativescript-vue for android.
Successfully prepared plugin tns-core-modules for android.
Successfully prepared plugin tns-core-modules-widgets for android.
Built aar for nativescript-downloader
Project successfully prepared (Android)
Building project...
Gradle build...
         + applying user-defined configuration from /home/darahat/Desktop/Wallpaper/dist/app/App_Resources/Android/app.gradle
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
Configuration 'debugCompile' in project ':app' is deprecated. Use 'debugImplementation' instead.
         + adding nativescript runtime package dependency: nativescript-optimized
         + adding aar plugin dependency: /home/darahat/Desktop/Wallpaper/dist/node_modules/nativescript-downloader/platforms/android/nativescript_downloader.aar
         + adding aar plugin dependency: /home/darahat/Desktop/Wallpaper/dist/node_modules/tns-core-modules-widgets/platforms/android/widgets-release.aar

> Unable to apply changes on device: 0123456789ABCDEF. Error is: Command ./gradlew failed with exit code 1.'

Json file

{
  "name": "wallpaper",
  "version": "1.0.0",
  "description": "hd wallpaper android app by nativescript",
  "author": "darahat <darahat42@gmail.com>",
  "license": "MIT",
  "scripts": {
    "build": "webpack --env.tnsAction build",
    "build:android": "npm run build -- --env.android",
    "build:ios": "npm run build -- --env.ios",
    "debug": "webpack --watch --env.tnsAction debug",
    "debug:android": "npm run debug -- --env.android",
    "debug:ios": "npm run debug -- --env.ios",
    "watch": "webpack --watch --env.tnsAction run",
    "watch:android": "npm run watch -- --env.android",
    "watch:ios": "npm run watch -- --env.ios",
    "clean": "rimraf dist"
  },
  "dependencies": {
    "axios": "^0.18.0",
    "nativescript-cardview": "^3.0.1",
    "nativescript-downloader": "^2.0.0",
    "nativescript-theme-core": "^1.0.4",
    "nativescript-vue": "^1.3.1",
    "pexels-api-wrapper": "^1.0.9",
    "tns-core-modules": "~3.4.1",
    "vue-router": "^3.0.1",
    "vuex": "^3.0.1"
  },
  "devDependencies": {
    "babel-core": "^6.26.0",
    "babel-loader": "^7.1.4",
    "babel-plugin-transform-object-rest-spread": "^6.26.0",
    "babel-preset-env": "^1.6.1",
    "copy-webpack-plugin": "^4.5.1",
    "css-loader": "^0.28.11",
    "extract-text-webpack-plugin": "^3.0.2",
    "fs-extra": "^5.0.0",
    "nativescript-vue-externals": "^0.1.2",
    "nativescript-vue-loader": "^0.1.5",
    "nativescript-vue-target": "^0.1.0",
    "nativescript-vue-template-compiler": "^1.3.1",
    "node-sass": "^4.7.2",
    "ns-vue-loader": "^0.1.2",
    "optimize-css-assets-webpack-plugin": "^3.2.0",
    "rimraf": "^2.6.2",
    "sass-loader": "^6.0.7",
    "vue-template-compiler": "^2.5.16",
    "webpack": "^3.11.0",
    "webpack-synchronizable-shell-plugin": "0.0.7",
    "winston-color": "^1.0.0"
  }
}

at last line of Error log it shows that command ./gradlew failed with exit code.i cant figure out why the problem is occurring.

triniwiz commented 6 years ago

Did you run the clean ?

Darahat commented 6 years ago

Yes.Every time after installing npm package i run npm clean .But for this package when i try to debug getting error.Have any suggestion pls?

xyh67 commented 6 years ago

I have the same problem with nativescript-vue