Problems upgrading from old Gradle version

I’m updating an old project in Android Studio to use Gradle 8.3. I’ve run into a lot of errors and was trying to work through them but am feeling stuck now. This is the current error I’m getting when trying to Sync my project in Android Studio:

Resolving dependency configuration 'implementation' is not allowed as it is defined as 'canBeResolved=false'.
Instead, a resolvable ('canBeResolved=true') dependency configuration that extends 'implementation' should be resolved.

I had setup build flavors and in Android Studio I used to have a list of variants I could select from. This list is now empty and I suspect it’s something to do with this error above.

I’m not very knowledgeable with gradle and how to properly set it up so any help would be appreciated. I’ve really fooled around with different gradle versions, android.tools.build version and Java versions so I’m sure I’ve really messed some stuff up.

Gradle 8.3
com.android.tools.build:gradle:8.1.1
Java version: jbr-17 17.0.6

Thanks!

Well, like the error says.
You somewhere try to resolve the configuration implementation (or give it as argument to something that resolves it) while it was never meant to be resolved and is now prevented. You probably should have used the compileClasspath or runtimeClasspath instead, depending on what you need.

Where you did this is impossible to say without seeing your build.