[studio] Sort out the differences between make Project, clean Project, and Rebuild Project in studio

In the past, when using eclipse, the project encountered problems. We usually click "Project->Clean.." to get it done, but after arriving at the studio, several Builds came out at once:

  • Make Project
  • Make Module
  • Clean Project
  • Rebuild Project
  • Build APK
  • Sync now

really confused

I used Clean before, but now I am looking for similar ones. I choose between Clean Project and Rebuild Project. Which one I choose depends entirely on my mood.

Make Project: I don't know what the hell is. I really don't know what the US emperor thinks.

Make Module: Makes me even more dizzy. Let me tell you a joke, at first I didn't know the relationship between Project and Module. I never used Module, and built a Project with one program. Now that I think about it, I was so stupid and naive.

Sync now: I don't usually use this one. I usually encounter problems in gradle. It pops up by itself, and I just click it.

Not to mention the others.

Let's get to the point.

I went to the Internet to carry a few differences about them, first on stackOverFlow:

Most of the time you should use Make Project. Sometimes, after adding libraries and making big changes to the project you should use Rebuild Project.

If you look at the menu, you’ll see that Make Project and Compile have keyboard shortcuts, that suggests that they are often used. Others are seldom used.

It is the same as IntelliJ Idea.

Compile All the source files in the specified scope are compiled. The scope in this case may be a file, a package, etc.

Make Project All the source files in the entire project that have been modified since the last compilation are compiled. Dependent source files, if appropriate, are also compiled. Additionally, the tasks tied to the compilation or make process on modified sources are performed. For example, EJB validation is performed if the corresponding option is enabled on the Validation page.

Make Module Compiled are all the source files that have been modified since the last compilation in the selected module as well as in all the modules it depends on recursively.

Rebuild Project All the source files in the project are recompiled. This may be necessary when the classpath entries have changed, for example, SDKs or libraries being used added, removed or altered

I can barely understand the first three paragraphs, but I can't read them any longer. Next, I'll go over some differences between the Chinese versions.

  1. Make Project: Compile all Modules under the Project. Generally, there are updated files under the Project since the last compilation, and no apk is generated.
  2. Make Selected Modules: Compile the specified Module. Generally, there are updated files under the Module since the last compilation, and no apk is generated.
  3. Clean Project: Delete the previously compiled compiled files, and recompile the entire Project, which takes time and does not generate apk.
  4. Rebuild Project: First perform the Clean operation, delete the previously compiled compiled files and executable files, and then recompile the new compiled files without generating apk. The effect here is actually the same as the Clean Project. I don’t know what the hell Google is doing~~
  5. Build APK: The first 4 options are all compiling, and no apk file is generated. If you want to generate an apk, you need to click Build APK.
  6. Generate Signed APK: Generate a signed apk.

Notice:

The final effect seen for Clean and Rebuild is the same. 
Usually small changes can be used directly with Make Project. You can see that only it has a shortcut, indicating that this function should be used frequently. For some major changes such as updating lib, major functional modifications, etc., use Clean or Rebuild, after all, these two will take time to compile. 
If you sometimes fail to compile, try Clean more, there will be unexpected results!

After reading these things, I am still a little confused, but I am a little more awake than before, maybe I will understand it later.

stackOverFlow

Chinese

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325475615&siteId=291194637