I'm trying to follow the Kotlin Koans tutorial in Android Studio by installing the EduTools plugin and choosing Kotlin Koans course.
Everything works fine, but when I try "Check Task" in the Task Description panel, I get this error:
Failed to launch checking
I also tried the plugin with Intellij IDEA and got the same error.
Using:
- Android Studio 3.2 with EduTools 2.0-2018.1-443
- Intellij IDEA 2018.2.3 with EduTools 2.0-2018.2-906
I found the problem in IDE logs as @NullReference suggested.
INFO - ecker.gradle.GradleCommandLine - Failed to launch checking
Cannot run program "./gradlew" (...) No such file or directory
I had configured the project (Settings / Build, Execution, Deployment / Build Tools / Gradle) to use a local Gradle distribution and it seems that EduTools plugin always looks for the Gradle Wrapper, so I just had to generate a Wrapper for project and configure it to use my local Gradle distribution:
gradle wrapper --gradle-distribution-url file:///path/to/local/gradle-4.6-all.zip
Maybe could try IntelliJ Idea Edu which comes already bundled with EduTools.
I also got this issue. Finally, I 've resolved it by configuring my gradle bin to PATH.
Here are series of commands to configure Gradle into you Path.
# cd ~
# touch .bash_profile
# open -e .bash_profile
//to edit your bash_profile ,you need to input your local path to bash_profile,like this:
export GRADLE_HOME=/Users/PCNAME/.gradle/wrapper/dists/gradle-4.5-bin/bgd6nrwgxy3inh8yed6gmsvbx/gradle-4.5/ --- use your own grade path to replace them.
export PATH=${PATH}:${GRADLE_HOME}/bin
# source .bash_profile
# gradle -v // you will see your gradle version if your configure successfully.
Restart Android Studio, try to run your EDUTOOLS.
I received the same error. I closed Android Studio and created a new Koans project thinking I must have done something wrong. This time I received a new build time error when trying to "Check". None of this made sense so I just shut down Android Studio, reopened the Koans project I just created and clicked "Check". Everything seemed to work now.
Had the same problem. Just Sharing how I fixed this problem.
- I opened build.gradle of my Kotlin Koans Project and scrolled down to where wrapper was defined.
- Pressed play icon right next to it.
- Was greeted with an error
Error:Failed to open zip file.
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)
Re-download dependencies and sync project (requires network)
- Followed Answer by Hamid
To resolve this issue close Android Studio and delete the following
directory's content, necessary files will be downloaded on IDE's next
launch.
macOS: ~/.gradle/wrapper/dists
Linux: ~/.gradle/wrapper/dists
Windows: C:\Users\your-username.gradle\wrapper\dists
- Restarted Android Studio and it worked like a charm.
In my case I had a problem related to JDK 11 and I had JDK 8 installed.
This is how I fixed the problem:
Go to Settings / Build, Execution, Deployment / Build Tools / Gradle.
At Gradle JVM select JDK 11 path.
It worked for me.