Difference between clean project and rebuild project in android studio

What is the difference between Clean Project and Rebuild Project (in Android Studio)?

  • I had a problem with the R file about res ids, so I changed the file extension from gif to png and then [my build failed.]
  • I found the solution was to Rebuild Project. This prompts my question above.

A clean just removes all build artifacts. A rebuild does a clean followed by a build of your project.

EDIT #2 This is 100% true. Refer to this for a thorough demonstration of its correctness.


What I experienced,

When you do clean, it removes the binaries inside build folders, and postpones building them again to the next run.

When you do rebuild, it does clean and rebuild for those files inside build folder, which rebuilt again in the next run. It does not rebuild the APK!! Which is really weird.

so:

Clean removes the build folders contents.

Rebuild removes the build folder's contents. And builds some binaries; not including the APK!

BTW, I am using Android studio 2.0 Preview 7.