Note: Recompile with -Xlint:deprecation for details

ぐ巨炮叔叔 提交于 2020-12-06 13:09:26

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!