Difference between clean project and rebuild project in android studio

后端 未结 2 507
眼角桃花
眼角桃花 2020-12-02 17:59

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

  • I had a problem with the
相关标签:
2条回答
  • 2020-12-02 18:41

    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.

    0 讨论(0)
  • 2020-12-02 18:47

    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.

    0 讨论(0)
提交回复
热议问题