If the build.gradle What happens if you change Maven central to Maven central 2?
Error message: could not find method mavencentral2() for arguments  on repository container of type org.gradle.api . internal.artifacts.dsl .DefaultRepositoryHandler.
For this defaultrepository handler, search the gradle directory and find the corresponding java file:
DEFAULT_ MAVEN_ CENTRAL_ REPO_ The name constant is defined in the following file:
In the createmaven central repository method of the defaultbaserepository factory, create a maven repository with the URL of Repository.MAVEN_ CENTRAL_ URL:
This constant is defined in the file Artifac tRepositoryContainer.java Li:
String MAVEN_CENTRAL_URL = “https://repo.maven.apache.org/maven2/”;
You can open this URL in the browser, which stores various development libraries:
therefore build.gradle The following configuration information tells gradle to get the contents of the tool library from Maven central repository, that is, the URL https://repo.maven.apache.org…
For more original articles on Jerry, please pay attention to the official account of “Wang Zixi”: