For every new Android project, there are two build.gradle files, one in the outermost directory, one in the app directory, and both under Gradle Scripts if you switch to Android mode. Here are the ones that look small (in the outermost directory).

** Main introduction:

Jcenter () : A code repository where many Android open source projects host code. What it does: After configuration, you can easily use any open source project on JCenter in your project. 支那

In app directory:



Main introduction:

1. Apply Plugin: Applies a plugin. Com.android. application represents an application module, com.android.library represents a library module, the differences are as follows:

Com.android. application: Can be run directly

Com.android. library: can only run as code attached to another application module

2. ApplicationId: Specifies the package name for the entire project. You can change the package name in it when you want to change it.

3dependencies: Identifies third-party libraries that need to be used. In AS projects, there are three dependencies: local dependencies, library dependencies, and remote dependencies.

Local dependencies: Add dependencies to local Jar packages or directories

Library dependencies: Library modules in a project add dependencies.

Remote dependencies: Add dependencies to open source projects on the JCenter library.

Build. Gradle file fails to build.

The Gradle plugin version does not match the Gradle plugin version in the build\ Gradle installation directory.