'Unable to find Groovy method when building Rhino with Intellij IDEA
While trying to build https://github.com/mozilla/rhino
, I'm getting Unable to find method
on org.codehaus.groovy.runtime.StringGroovyMethods
.
so the build fails, and I'm unable to test Rhino built from source code, which is the goal.
Steps Taken
From the opening screen in IntelliJ, I check out the project:
I get this error Unable to find method ''java.lang.String org.codehaus.groovy.runtime.StringGroovyMethods.capitalize(java.lang.String)''
right away, which I have not been able to fix:
There are two suggestions in the above Re-download dependencies and sync project
and Stop Gradle build processes
. I have tried both with no improvement.
When I look at the build.gradle
file, I see another suggestion ...configure Gradle wrapper to use distribution with sources...
. This also does not get past the missing Groovy method problem.
I have looked on S.O. for similar issues and tried various things under File > Settings > Build, Execution, Deployment
, but I realized I'm over my head since, conceptually, I'm not sure what I need and where that would go in the settings.
The command line items from the readme work as expected, but going back to File > Build
still fails (added after tim_yates comment).
What changes are required to the IDE or to the build definitions to allow Mozilla Rhino to build properly?
Solution 1:[1]
I installed the latest (2022.1) version of IntelliJ IDEA Community Edition. During the install, it asked if you wanted this IDE to be associated with Groovy file types, and I answered in the affirmative.
On this new install, the Unable to find method
on org.codehaus.groovy.runtime.StringGroovyMethodserror
did not appear, so the problem was solved by upgrading the IDE (and also that required updating GIT).
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Dale |