问题
Note: Some input files use or override a deprecated API. Note:
Recompile with -Xlint:deprecation for details.
I found many posts about this issue but none that says how to deal in android studio. Where i can set this system property in this IDE, for the project only?
回答1:
I had the same question and found the answer elsewhere.
This answer says that it can be configured in Android Studio's settings under Build Execution -> Compiler -> Java Compiler -> Additional command line parameters, but I couldn't find the Java Compiler section with 3.1.3 even though the answer was for 3.1.2.
This answer explaining how to change the gradle files is what worked for me, reproduced below:
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
来源:https://stackoverflow.com/questions/51109810/note-recompile-with-xlintdeprecation-for-details