"Code Cleanup..." feature of Android Studio v2.2.2
Asked Answered
I

1

20

In Android Studio v2.2.2, Code Cleanup feature available under Analyze option.

Analyze >> Code Cleanup 

What this option exactly do with code ?

Please explain in details.

Inanity answered 8/12, 2016 at 6:38 Comment(0)
H
40

When you clean up your code using 'Android Studio', It start inspecting code defined rules.

For list of defined rules check, File -> Settings -> Editor -> Inspection. (For Mac, Android Studio -> Preferences -> Editor -> Inspection) Here you can find all rules like,

  1. non-used variables,
  2. non-used import,
  3. Abstaraction issues,
  4. Code style issues,
  5. Java Beans issues etc.

After inspection of code, Android Studio will remove such code from your files that is not necessary. It is called cleaning up code.

There are many plugins available for it. As Android Studio support by default, You can format and clean your code using this feature.

Holmquist answered 8/12, 2016 at 8:53 Comment(1)
Be careful because this option do the cleanup without previewing the code that will be modifiedFigured

© 2022 - 2024 — McMap. All rights reserved.