I am learning Android development, and I am confused with clean and rebuild project. My questions are :
- Under which circumstances we need to clean and rebuild project? And why ?
- What is the difference between clean and rebuild project?
I am learning Android development, and I am confused with clean and rebuild project. My questions are :
Gradle
will maintain build cache, you can see that for your project under app/build
folder, it contains auto generated classes, build caches which gradle will use to reduce work every time when your are building a project, doing a clean
will clear the caches for project and tells Gradle to do a fresh build causing significant additional build time for the subsequent task execution.
Rebuild
does clean first and then build the project.