My IntelliJ Idea projects have been working fine until I cloned a new project from our repo and installed Gradle.
This new project runs, but running the debugger causes the following error:
I've completed the steps recommended in this similar SO question. I have also read the Gradle Daemon guide.
Some helpful information:
-Gradle does respond to command line prompts, including --profile and --status:
-The project builds and executes; the problem is only the debugger. Is this a mapping issue between IntelliJ and Gradle?
-In the Settings menu, Gradle JVM: is set to "Use Project JDK (Java version "1.8.0_211") and this program is written in Java 8. Delegate settings set to: Build and run using intelliJ IDEA. Run tests using IntelliJ IDEA. Should these change to Gradle?
-I took the advice of one of the respondents and had one of our IT guys check out my ports and firewall settings. He was unable to solve the problem and said the issue is with Gradle.
So far, nothing has worked. What should I do?
I solved this problem after some tinkering:
In (IntelliJ) File > Settings > Build, Execution, Deployment > Gradle, I changed "Use gradle 'wrapper' task configuration" to "Use local gradle distribution."
Also, notice in this screenshot that "Gradle VM options" has a custom value; this was suggested as a solution in another post. This relates to memory management, as some people speculated that the daemon was crashing because of a RAM issue. My solution appears to work regardless of whether I alter that value.
I have the latest Android Studio IDE installed on my Windows 10 laptop, and it was working fine until my windows operating system made a huge automatic update.
Now, when start my Android Studio IDE, I get the following error and it doesn't build.
Gradle sync failed: Read timed out Consult IDE log for more details
(Help | Show Log) (3m 34s 195ms)
I need help on this.
I encounter this error "Read Time Out", and I simply choose menu item: File -> Invalidate Caches / Restart... to fixed it.
[UPDATE]
I just encounter this error for second time, this time Invalidate Caches / Restart... not able to fix it, but then I try close the android Studio, killall -9 java to ensure all java process has been terminated, then relaunch Android Studio, no more error.
[UPDATE 2]
I just encounter this error and I fixed it by replug the phone cable and rerun.
I got around this issue by turning on Offline Mode in the Gradle tool window.
I have just synced the Project with Gradle files and it worked
Editing global gradle.properties with the following line was the fix for me:
org.gradle.jvmargs=-Dorg.gradle.internal.http.connectionTimeout=120000 -Dorg.gradle.internal.http.socketTimeout=120000
For Chinese users who often use a proxy to download dependency jars, the cause is often proxy settings.
We should check multiple places if the proxy is correctly configured.
Android Studio Settings - Appearance & Behavior - System Settings - HTTP Proxy
${project_root}/gradle.properties
~/.gradle/gradle.properties
In my case, I somehow once configured an HTTP proxy in ~/.gradle/gradle.properties, which was forgotten later. Then when I dealt with a SOCKS5 proxy in IDE Settings and project-level gradle.properties, things always run into trouble. Finally, deleting invalid proxy settings in ~/.gradle/gradle.properties save my day.
I fixed the error by inserting following lines in gradle.properties:
systemProp.org.gradle.internal.http.connectionTimeout=180000
systemProp.org.gradle.internal.http.socketTimeout=180000
This sets the Gradle's connection timeout from the default 30s to 180s (3m).
In my case the read timeout occurred because my computer is behind a HTTP proxy, and it failed to timely connect to http://jcenter.bintray.com.
For more info about the Gradle options, you can refer to https://github.com/gradle/gradle/issues/3370
Simple Answer:
Check the Internet Connection - it should not fluctuate while building the project
File-->>Sync Project with Gradle File
Build>> Clean Project Or Rebuild Project.
I just removed
include ':app'
from setting.gradle and then sync project
it will fails again
then write it back an re-sync and then error gone and will start downloading.
Here's what worked for me (on Windows):
From C:\Users\{$user}\.gradle
Delete these 3 folders:
caches
daemon
wrapper
Then restart Android Studio and Gradle should start downloading automatically
None of the answer worked for me.
I solved it by
Delete project>.gradle directory
File>Sync Project with Gradle Files
In my case it was due to Jitpack.io server down, causing my project unable to build. So I just enabled the Offline Mode for gradle to continue developing my project while Jitpack.io is resolving their server issue.
You will see more info when you click "build" on top of the "read time out" message in build output. In my case, it was a facebook dependency issue so I just had to upgrade it to a newer version.
In my case, it was a firewall issue. After adding Android Studio to its whitelist everything is working fine.
A simple Clean Project + Rebuild Project worked for me
I resumed working on my project after a long time and I was using an Old version of navigation dependency.
after updating version to versions.navigation = "2.3.0" from versions.navigation = "2.3.0-aplha01" my issue was resolved.
so in short make sure you are using latest version of gradle and all libraries (compatible with your gradle version).
Above fixes didn't work for me on MacOS Big Sur 11.5.1 after updating to the new version of Arctic Fox 2020.3.1 Patch 3.
My issue with this was resolved by doing the following:
Close your Android project
Navigate to the root folder of you project
Remove the '.gradle' and '.idea' folders
Start your Android project, which will start the build process. Let this finish
Now the build should succeed. If not, also do an 'Invalidate caches/restart'
In my case, this error was showing up while I am trying to create a new project,
and the default Kotlin Gradle plugin API version was the culprit,
While building/Gradle sync I noticed that the sync process is always getting stuck at the downloading kotlin.gradle.plugin.api:1.5.21,
So I searched for 1.5.21 in the build.gradle and updated it to the latest version, and it worked.
Just Simple Step and you Got Solution.
Android Studio -> FILE -> Invalid Caches / Restart -> Invalidate and Restart
Done Keep Code ☻♥
In my case, Android Studio Arctic Fox | 2020.3.1 Patch 4 (Windows)
I have try 3 step/solution;
Delete 2 root folder .gradle & .idea but still give 'Read timeout'
Invalid Caches/Restart also resulted 'Read timeout'
Close Android Studio, repeat solution 1, monitor 'Build Output' log, then choose 'Disable gradle offline..." , wait and let Android Studio do its thing, then on the log Build showed "BUILD SUCCESSFUL in 28s". Then, I try to run the app just to check and my apps still work as usual.
*Remark: This case happened might be because of my Android Studio IDE Version outdated. As for now, latest version is Android Studio Dolphin | 2021.3.1 Patch 1 .
This error got due to the internet connection during gradles files connection interrupts.
I tried the following techniques but unfortunately, didn't get any solution.
File->Invalidate Cache.
File->Sync Project with .gradle files
Delete Project .gradle and .idea files.
I got the solution to update gradle-wrapper.properties 6.8 to 7.1 after successfully sync revert back from 7.1 to 6.8
#distributionUrl=https://services.gradle.org/distributions/gradle-7.1-bin.zip
distributionUrl=https://services.gradle.org/distributions/gradle-6.8-bin.zip
Use the following code in gradle.properties :
systemProp.http.proxyHost=www.somehost.org
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=userid
systemProp.http.proxyPassword=password
systemProp.http.nonProxyHosts=*.nonproxyrepos.com|localhost
org.gradle.daemon=false
Same configuration is working with window 10. but when i tried same configuration run with ubuntu, its showing an error.
error message while running with jenkins
The clean plugin cannot delete the named folder. Make sure the Jenkins has the right to delete the folder and that it is not locked in some other way.
By the way: Copy the text of your error into the question, don't make a bad photo.
Some process has hold of the file /home/xelpmoc-06/Documents/Doc/zerodha/target/classes/LoginZerodha/Zerodha/App.class.
Java process or Eclipse or some other program is doing some job with it. So that's why its showing that error. So please kill Java Process or restart Eclipse. May be your jenkins build failure, also can cause this to happen. So if nothing works out please restart your jenkins itself.
Here I am attaching a link that may be helpful to you. Please go through this. Hope this helps.
I have created a maven vaadin project using the command line like this:
mvn archetype:generate -DarchetypeGroupId=com.vaadin -DarchetypeArtifactId=vaadin-archetype-application -DarchetypeVersion=7.1.9
Then I change into the folder of the application and I give at the command line the following :
mvn install
After waiting for the application to compile, I open it using IntelliJ Idea (by opening the pom.xml file), I add Tomcat Server and I press run.
Then the IntelliJ Ide recompiles the application again.
Is there any way I can avoid this second compilation?
Thank you.
You should have tomcat configured as a server, and configure your module(s) to deploy at server startup. On the run configuration you will see a list of things to do before launch. It will probably say Make -- you can remove this if you need to.
However, you probably should allow idea to do this for you and really stop doing it on the command line. Idea can handle more complex build patterns for you. You should trust it.
I installed SpringSource Tool Suite after which I was alerted that I hadn't set the JAVA_HOME. The installation was successful by then, so I closed the suite and set the java_home.
But now I don't find any way to open the suite. No shortcut in desktop or start menu.
How to open it?
Or should I re-install it?
In windows 7 go to Start > search program and files and type spring then in the results you will find Spring Tool Suit.
Else if you remember the installation path, to there you can find the STS.exe file
I face the same issue, was unable to open STS because of the Lombok path .inc file of STS.
remove the path and start.
Suggestion
if you added some external project like Lombok and did not install properly and you removed that project due to some reason then you must remove the path from the inc STS file.