Help with Gradle build failed

Hello. Please help me with this problem. I’ve been trying to fix it, but I can’t come up with any solutions. My Unity is 2023.1.16f1 and I’m on MacBook pro M2.

FAILURE: Build failed with an exception.

  • Where:
    Build file ‘/Users/salakhitdinovkhidayotullo/LittleWanderersFlight/Library/Bee/Android/Prj/IL2CPP/Gradle/launcher/build.gradle’ line: 71

  • What went wrong:
    A problem occurred configuring project ‘:launcher’.

No signature of method: com.android.build.api.variant.impl.BundleConfigImpl.addMetadataFile() is applicable for argument types: (String, org.gradle.api.internal.provider.MappingProvider) values: [com.unity, map(org.gradle.api.file.RegularFile provider(?) org.gradle.api.internal.file.DefaultProjectLayout$1@1214955)]

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 1s

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:197)

idk if this is the case but if any script used in the game has using UnityEditor; in it won’t build