Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gradlew.bat failed with exit code 1

Tags:

nativescript

i am very new to nativescript, i try to build my first app in nativescript, but it shows

============================================================================= C:\Nativescript\Grab1>

C:\Nativescript\Grab1>tns prepare android Executing before-prepare hook from C:\Nativescript\Grab1\hooks\before-prepare\na tivescript-dev-android-snapshot.js Preparing project... SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further detail s.

FAILURE: Build failed with an exception.

  • What went wrong: org/slf4j/impl/StaticLoggerBinder

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Processing node_modules failed. Error: Command C:\Nativescript\Grab1\platforms\a ndroid\gradlew.bat failed with exit code 1

C:\Nativescript\Grab1>

================================================================================

here i attached my command prompt screen shot also, please help me to solve this problem friends

like image 401
buvi Avatar asked Feb 24 '17 07:02

buvi


2 Answers

It seems some files missing in platform -> android folder. I fixed this issue by removing the android platform and adding it again by using the below command:

Make sure you are in project directory.Then try this below two commands:

tns platform remove android

tns platform add android

Same way for IOS:

tns platform remove ios

tns platform add ios
like image 167
Steve Avatar answered Nov 09 '22 13:11

Steve


Just in case if someone out there is having the same problem on MacOS systems

  1. tns platform remove iOS
  2. tns platform add iOS
like image 39
Tshepo Kingsley Mola Avatar answered Nov 09 '22 15:11

Tshepo Kingsley Mola