What is unclear?
The error tells you that you tried to do repositories { ... } either with invalid content, or at an illegal place.
There is no top-level repositories block in the settings script, only within pluginManagement { ... }, or within dependencyResolutionManagement { ... }.
Besides that, I strongly recommend switching to Kotlin DSL. By now it is the default DSL, you immediately get type-safe build scripts, actually helpful error messages if you mess up the syntax in many situations, and amazingly better IDE support if you use a good IDE like IntelliJ IDEA or Android Studio.
Also, you should strongly consider not using mavenLocal like that. It is broken by design in Maven already, makes your builds slow, and at best unreliable, at worst silently wrong. If you need it, always have it as last in the list, optimally always with a repository content filter that controls exactly what is used from it, and best it is avoided at all whenever possible.
thanks for the reply, but if it’s not difficult,can you show me how the code should look right,The thing is, my level of coding leaves a lot to be desired… if you help, I’d really appreciate it.
I cannot write your code for you, I don’t know what it should achieve.
But I told you already what the syntax problem is.
Also, if I would write the code for you, that wouldn’t help you much, because if you want to develop, you have to learn how to do it.