Problems migrating to Capacitor 4

We have just migrated to Capacitor 4 and are now facing an issue where we can’t change bundle id using the ionic extension in vscode. We do this to target different environments we are deploying our app to.

This is the output i get:

Set iOS Bundle Id for target App buildConfig.Debug to se.example.app.acc
Set iOS Bundle Id for target App buildConfig.Release to se.example.app.acc
Set Android Package Name to se.example.app.acc
[error] Unable to setPackageName for android: Error: Unable to load or parse gradle file: Error: Could not find or load main class com.capacitorjs.gradle.Parse
Caused by: java.lang.ClassNotFoundException: com.capacitorjs.gradle.Parse

Any ideas what’s causing this, or how it can be fixed?