Android under optimization clears invalid unused code Ucdetector
official: http://www.ucdetector.org/index.html
Ucdetector is an eclipse tool that can review unused, redundant, variable-spec code in a program
Need to note:
Reflection , configuration injection in XML , application of third-party engineering, JAR-package invocation, etc. need to be judged by hand
We recommend that you delete the class by searching globally to see if there are other places calling Eclipse Global Search shortcut keys (windows:ctrl+g , mac:control+g)
The version I'm using is Org.ucdetector_1.10.0.jar
(i) Installation
Place the downloaded jar package in the Eclipse folder under the \eclipse\dropins folder, then restart Eclipse
:
(ii) operational use
Open Eclipse after installation is complete
The operation flow is as follows: Right click project → select ucdetector→ Select Detect unnecessary code and wait to run
(It may be a bit long if the project is relatively large)
:
(iii) operational results
Reports that run the results are generated in the workspace folder ucdetector_reports of the current eclipse open
There will be 2 files in the Ucdetector_reports folder
The results of the operation are also shown in Eclipse's problem.
:
(iv) Screening
To make it easy to find the filter categories for the results in problem
Select inverted triangle → pop-up window →group By→type
:
(v) Optimization
Follow the prompts to find the corresponding class to delete
For example, in the class baseactivity
:
Double-click the entry in the problem to enter the appropriate class:
(vi) Closure
plug-in use to note :
Reflection , configuration injection in XML , application of third-party engineering, JAR-package invocation, etc. need to be judged by hand
We recommend that you delete the class by searching globally to see if there are other places calling Eclipse Global Search shortcut keys (windows:ctrl+g , mac:control+g)
Attached references:
lint Classification and common mistakes
http://mikewang.blog.51cto.com/3826268/1003276
44 Java Code Quality management tools:
http://blog.csdn.net/qbg19881206/article/details/8757026
With the beast, I wish you every daily diligence.
┏┓┏┓//┏┛┻━━━┛┻┓//┃┃//┃━┃//┃┳┛┗┳┃//┃┃//┃┻┃//┃┃//┗━┓┏━┛// ┃┃ god beast bless ┃┃ Code no bug! ┃┗━━━┓// ┃┣┓// ┃┏┛// ┗┓┓┏━┳┓┏┛// ┃┫┫┃┫┫// ┗┻┛┗┻┛
Next Android resource files optimized for Android lint use
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Android Optimizer clears invalid code ucdetector