I want to update to android gradle plugin 7.0. Is there any way I could test what changes I will be required to do in my project or code? Is there any preview tool in android studio?
If 'preview tool' you saying is about the AGP Upgrade Assistant:
The assistant allows you to toggle the commands that will be executed on your project to upgrade to a higher version of AGP, preview exactly which files will be affected by the AGP upgrade, and lastly globally update deprecated configurations.
The assistant is automatically prompted when you open a project which is using an older gradle version (or select it manually from Tools > AGP Upgrade Assistant...
).
When you select Show Usages button:
And for actual preview purpose, I would back up the project folder (e.g. simply compress to a zip or ideally using a VCS as @MartinZeitler suggests) and then execute update with AGP Upgrade Assistant by submitting Run selected steps button.
If I encounter a problem by upgrade, just delete the project folder and extract from the zip or rollback with VCS.