> Configure project :unityLibrary Build was configured to prefer settings repositories over project repositories but repository 'maven' was added by build file 'unityLibrary\build.gradle'
...
[빌드에러 #2]
Execution failed for task ':launcher:checkReleaseDuplicateClasses'. > Could not resolve all files for configuration ':launcher:releaseRuntimeClasspath'.
Also, there is another workaround that keeps the Gradle version (in case some android lib requires it). For that workaround, you will need to copy a file from/Applications/Unity/Hub/Editor/2022.2.3f1/PlaybackEngines/AndroidPlayer/Tools/GradleTemplates/settingsTemplate.gradletoAssets/Plugins/Android/settingsTemplate.gradle. That way Unity will use your template inAssets/Plugins/Android. (It's weird that Unity doesn't has a checkbox for that) For my version of unity, it looks like that:
The conflicting part isRepositoriesMode.PREFER_SETTINGS. But you can safely delete the wholedependencyResolutionManagementblock from here. Since the android project still needs to know about local dependencies, copy therepositoriesblock, you will need it later. NowsettingsTemplate.gradleshould look like this: