Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a tool to remove unwanted ,unused variable [closed]

Are there any tools that could remove the unwanted variables from the android project.I have tried PMD(which is a good tool),but I want a more generic unused variable remover.

like image 503
Abx Avatar asked Jul 22 '13 10:07

Abx


2 Answers

Yes there is a helpful tool called AndroidUnusedResources

Check this out here

like image 95
Nargis Avatar answered Nov 11 '22 19:11

Nargis


You can probably use Android.Lint

Android Lint is a new tool introduced in ADT 16 (and Tools 16) which scans Android project sources for potential bugs. It is available both as a command line tool, as well as integrated with Eclipse (described below), and IntelliJ. The architecture is deliberately IDE independent so it will hopefully be integrated with other IDEs, with other build tools and with continuous integration systems as well.

Here are some examples of the types of errors that it looks for:

  1. Missing translations (and unused translations)
  2. Layout performance problems (all the issues the old layoutopt tool used to find, and more)
  3. Unused resources
  4. Inconsistent array sizes (when arrays are defined in multiple configurations)
  5. Accessibility and internationalization problems (hardcoded strings, missing contentDescription, etc)
  6. Usability problems (like not specifying an input type on a text field)

refer http://tools.android.com/tips/lint

like image 3
Chetan Potdar Avatar answered Nov 11 '22 18:11

Chetan Potdar