79414741

Date: 2025-02-05 12:31:59
Score: 0.5
Natty:
Report link

The error "org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed" usually occurs due to Groovy/Gradle script issues or JDK incompatibility. In my case, the problem was caused by Android Studio’s default JDK. Solution: Change JDK to a Locally Installed Version Open Android Studio. Go to File → Settings → Build, Execution, Deployment → Build Tools → Gradle. Under Gradle JDK, change the selection from the default Embedded JDK to your locally installed JDK. Click Apply and OK, then restart Android Studio. Sync Gradle again: File → Sync Project with Gradle Files. Why Does This Happen? The default JDK bundled with Android Studio might not be fully compatible with the Gradle version. Some third-party libraries require a specific JDK version to compile successfully. Gradle might be referencing an older or incompatible JDK, causing Groovy compilation issues. Alternative Fixes: If changing the JDK doesn't work, try:

Upgrading Gradle: Update gradle-wrapper.properties to a newer Gradle version. Deleting .gradle and .idea folders and then syncing again. Running Gradle from the command line for more details:enter image description here ./gradlew clean ./gradlew build --stacktrace Gradle Setting

Reasons:
  • Blacklisted phrase (1): enter image description here
  • Whitelisted phrase (-2): Solution:
  • Long answer (-1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Amit Pardeshi