The type groovy lang MetaClass cannot be resolved
The type groovy.lang.MetaClass cannot be resolved. It is indirectly referenced from required .class files
If you are using Groovy and getting above error while writing class first time it means Groovy run time to classpath is not yet set in eclipse. To set click red cross button and choose “Add Groovy Runtime to classpath” as below. This will add Groovy runtime to your classpath.
- Now if you open .classpath file in eclipse you will below line got added:
- Issue should be resolved now. For more information follow its official documentation here