When switching versions of Gradle or JDKs, running gradle will result with the daemon failing to start with the message:
FAILURE: Build failed with an exception.
- What went wrong: Unable to start the daemon process. This problem might be caused by incorrect configuration of the daemon. For example, an unrecognized jvm option is used. Please refer to the user guide chapter on the daemon at http://gradle.org/docs/current/userguide/gradle_daemon.html Please read below process output to find out more: ----------------------- ERROR: transport error 202: bind failed: Address already in use ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized […/…/…/src/share/back/debugInit.c:741] FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
Different projects use different versions of Gradle and/or JVMs, so this gets annoying. Many of our developers don’t use the daemon for this reason, and that slows things down.
Gradle should be able to kill older daemons if they’re not the right version instead of erroring out.