I have used clean project a few times after breaking my tutorial app. I did this by doing a refactor or some other fancy command on a variable. I don't actually know what android studio is doing in the background and I am wondering if anyone can give a good detailed answer in simple English. :)
Thank you in advance,
Obviously, try to clean your project from android studio : “Build -> Clean Project”. This will clear your build folders. Clear the cache of Android Studio using “File -> Invalidate Caches / Restart” choose “Invalidate and restart option” and close Android Studio.
It removes whatever already-compiled files are in your project so that you can do a complete fresh rebuild.
Rebuild removes the build folder's contents. And builds some binaries; not including the APK!
Use Windows File Explorer to navigate to the Android Studio project directory (normally in "x:\Users\YourName\AndroidStudioProjects") Select the project to delete. Press Delete (NOT Backspace!)
Simple answer it Deletes the build directory
It removes whatever already-compiled files are in your project meaning it removes the .class files and recompiles the project again.
Source is here : https://www.jetbrains.com/help/idea/2016.3/cleaning-system-cache.html?search=clean
If you want to have some fun by cleaning yourself
Open your project path using cmd (go to project path and type cmd and hit enter like below)
Then use command gradlew clean
and hit enter and see what happens when it cleans
For other tasks and meet your project's Mr.Gradle use command gradlew help
Clean action, basically invoking ./gradle clean
task in your application directory, which is removing all generated files, removes build folders. So basically next time you will run/build all the artifacts will be builded from the scratch and will not be reused.
More information you can find on a official gradle site
Information about android plugin
DSL reference for Android plugin
Cleaning the project removes all build artifacts (ex: deleting the app/build folder)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With