The Android App is a Gradle project that uses the com.android.application plugin. When you press the restore button, the clear button, or the start button. He will execute a sequence of commands. Note that not the whole team is a Gradle Task. For example, the start and debug button will launch adb behind the scenes.
In Rebuild you run several Gradle tasks. You can see it in the lower right corner of Android Studio.

In this case, Android Studio will perform the following Gradle tasks: clean, :app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources, :app:compileDebugSources, :app:compileDebugUnitTestSources, :app:compileDebugAndroidTestSources
What you see before the colon (:) is the name of the module. app:generateDebugSource will run the generateDebugSource task in the app module.
But what happens if you have several modules?

Android Studio seems to perform this task on every module.
Executing tasks: [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:compileDebugSources, :app:compileDebugAndroidTestSources, :app:compileDebugUnitTestSources, :myandroidlib:generateDebugSources, :myandroidlib:mockableAndroidJar, :myandroidlib:prepareDebugUnitTestDependencies, :myandroidlib:generateDebugAndroidTestSources, :myandroidlib:compileDebugSources, :myandroidlib:compileDebugUnitTestSources, :myandroidlib:compileDebugAndroidTestSources]
Will it clear the entire editing cache? I find that the size of the project is reduced after starting the recovery project?
It will clear the files in the build folder. Usually this is not included in the project (added to .gitignore ). In the build folder, your final apk , R files, a report file (for example, a lint / JUnit test report) and generated classes (from a dagger / retrofit) will be presented. That is why it will reduce the size of your project.
By the way, what does it mean to clear a project in Android studio?
If you mean clear project , then clean project .

Android Studio will perform the following tasks, which essentially remove the build folder.
Executing tasks: [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :myandroidlib:generateDebugSources, :myandroidlib:mockableAndroidJar, :myandroidlib:prepareDebugUnitTestDependencies, :myandroidlib:generateDebugAndroidTestSources]