-
./gradlew cleanUses your project’s gradle wrapper to execute your project’s
cleantask. Usually, this just means the deletion of the build directory. -
./gradlew clean assembleDebugAgain, uses your project’s gradle wrapper to execute the
cleanandassembleDebugtasks, respectively. So, it will clean first, then executeassembleDebug, after any non-up-to-date dependent tasks. -
./gradlew clean :assembleDebugIs essentially the same as #2. The colon represents the task path. Task paths are essential in gradle multi-project’s, not so much in this context. It means run the root project’s assembleDebug task. Here, the root project is the only project.
-
Android Studio --> Build --> CleanIs essentially the same as
./gradlew clean. See here.
For more info, I suggest taking the time to read through the Android docs, especially this one.