The type groovy lang MetaClass cannot be resolved

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.

The type groovy lang MetaClass cannot be resolved

  • Now if you open .classpath file in eclipse you will below line got added:

The type groovy lang MetaClass cannot be resolved

  • Issue should be resolved now. For more information follow its official documentation here

Leave a Reply

Your email address will not be published. Required fields are marked *