idea新建或打开安卓项目时报错

idea新建项目时报错:

Could not create an instance of type sync_studio_tooling4109_etj5j7903rvcja915lss78bgn.
> Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

打开一个原先在android studio中建立的项目报错:

Cannot convert string value 'JETPACK_COMPOSE' to an enum value of type 'com.android.builder.model.AndroidGradlePluginProjectFlags$BooleanFlag' (valid case insensitive values: APPLICATION_R_CLASS_CONSTANT_IDS, TEST_R_CLASS_CONSTANT_IDS, TRANSITIVE_R_CLASS)

然后项目在Android studio中完全没有问题。请求各位大神帮助。

只能在Android Studio 4.0以上版本打开才能没有这个报错
在idea上,应该算是bug了,需要更新Idea的插件版本,否则一直报错,不过目前没有更新