问题
I moved my Eclispe project to Android Studio, but it outputs a lot of deprecated errors when built. I tried some methods, but they don't work.
回答1:
Try placing this at the top of the methods:
@SuppressWarnings("deprecation")
Example
@SuppressWarnings("deprecation")
public void testMethod(){
...
}
For a brief explaination go to this link:
[What is @SuppressWarnings("deprecation") and ("unused") in Android?
Update:
It seems that there is also some known issues with deprecations. You might want to read this for more info:
stackoverflow.com/questions/26921774/how-to-avoid-deprecation-warnings-when-suppresswarningsdeprecation-doesnt
来源:https://stackoverflow.com/questions/37770754/android-studio-ignore-deprecated