-1

Without Using @suppuressWarnings("all") Looking this Error

Note: (File Path)\MainActivity3.java uses or overrides a deprecated API. Note: Recompile with -Xlint: deprecation for details.

After Using @suppuressWarnings("all") All errors solved?

What can I use this is the Right way??
Gourav
  • 1
  • 3
  • Suppressing the warning messages doesn't solve them - it just tells the compiler: don't bother me with these messages, I don't care. Does will hurt you some time later: when you update your development environment and the deprecated methods are gone your code will no longer compile. See https://stackoverflow.com/q/47740812/5646962 for a better way to solve the problem. – Thomas Kläger Dec 03 '21 at 05:38
  • Does this answer your question? [Recompile with -Xlint in Android studio](https://stackoverflow.com/questions/47740812/recompile-with-xlint-in-android-studio) – Thomas Kläger Dec 03 '21 at 05:39

1 Answers1

0

Use this for deprecation :

@SuppressWarnings("deprecation")

Take a look at http://blog.bangbits.com/2008/05/suppresswarnings-annotations.html

Deepanshu Rathi
  • 321
  • 1
  • 8