Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display classes containing deprecation Android Studio

I updated my project to the latest Android APIs and the project now has multiple deprecated methods. Does Android Studio have a cool way of listing all classes containing said methods, such as the TODO window? I know I can go through every class and search methodically through the code, but I would rather like to make it easy on myself.

like image 801
hopeman Avatar asked Jan 15 '16 08:01

hopeman


People also ask

What is deprecated in Android Studio?

An element may be deprecated for any of several reasons, for example, its usage is likely to lead to errors; it may be changed incompatibly or removed in a future version; it has been superseded by a newer, usually preferable alternative; or it is obsolete.

What are deprecated classes?

Similarly, when a class or method is deprecated, it means that the class or method is no longer considered important. It is so unimportant, in fact, that it should no longer be used at all, as it might well cease to exist in the future. The need for deprecation comes about because as a class evolves, its API changes.

Do deprecated methods still work in Android Studio?

Yes, you can use them.


2 Answers

If it helps someone else heres the answer to my question:

If you go to Analyze -> Inspect Code...

When your project has been inspected click on Code maturity issues and tada, there is a list of all Deprecated API usages :)

UPDATE: May 2021

Deprecation warnings are now found under your respective language.

Kotlin -> Migration -> Usage of redundant or deprecated syntax or deprecated symbols

Kotlin deprecation

Java -> Code maturity

Java deprecation

like image 139
hopeman Avatar answered Oct 11 '22 10:10

hopeman


Follow below steps: Go to Analyze -> Run Inspectinon By Name ->type Deprecated API Usage

like image 42
Sidhu Gaikwad Avatar answered Oct 11 '22 11:10

Sidhu Gaikwad