Nativescript: Could not locate the Gradle launcher

Created on 19 Dec 2017  路  4Comments  路  Source: NativeScript/NativeScript

I got into a new problem

$ tns run android
Searching for devices...
Skipping prepare.
Building project...
Gradle build...
Exception in thread "main" java.lang.RuntimeException: Could not locate the Gradle launcher JAR in Gradle distribution 'C:\Users\Hesam-D\.gradle\wrapper\dists\gradle-3.3-bin\64bhckfm0iuu9gap9hg3r7ev2\gradle-3.3'.
        at org.gradle.wrapper.BootstrapMainStarter.findLauncherJar(BootstrapMainStarter.java:43)
        at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:26)
        at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:108)
        at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Unable to apply changes on device: emulator-5554. Error is: Command gradlew.bat failed with exit code 1.

Project dir from hooksArgs is: 
Hooks directories: [ 'C:\\Users\\Hesam-D\\AppData\\Roaming\\npm\\node_modules\\nativescript\\lib\\hooks',
  'C:\\Users\\Hesam-D\\AppData\\Roaming\\npm\\node_modules\\nativescript\\lib\\common\\hooks',
  'D:\\By me\\mobile-app\\hooks' ]
AfterHookName for command watch is after-watch
Project dir from hooksArgs is: D:\mobile-app.
Hooks directories: [ 'C:\\Users\\Hesam-D\\AppData\\Roaming\\npm\\node_modules\\nativescript\\lib\\hooks',
  'C:\\Users\\Hesam-D\\AppData\\Roaming\\npm\\node_modules\\nativescript\\lib\\common\\hooks',
  'D:\\By me\\mobile-app\\hooks' ]
AfterHookName for command liveSync is after-liveSync
android

Most helpful comment

@Hesamp delete the C:\Users\Hesam-D\.gradle\wrapper\ directory, and give it another try.

All 4 comments

@Hesamp delete the C:\Users\Hesam-D\.gradle\wrapper\ directory, and give it another try.

@Hesamp were you able to run an android project successfully on the workstation?

@Pip3r4o
yes , I downloaded the zipped file version 3.3 earlier.
And run without problems

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