本文介绍了注意:有关详细信息,请使用-Xlint:deprecation重新编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用-Xlint:deprecation重新编译以获取详细信息.

Recompile with -Xlint:deprecation for details.

我发现了很多有关此问题的帖子,但没有一篇说明如何在android studio中处理.在哪里可以在此IDE中设置此系统属性,仅适用于项目?

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?

推荐答案

我遇到了同样的问题,并在其他地方找到了答案.

I had the same question and found the answer elsewhere.

此答案表示可以在Android Studio的执行设置->编译器-> Java编译器->其他命令行参数,但是即使答案是3.1.2,我也找不到3.1.3的Java编译器部分.

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.

此答案解释了如何更改gradle文件,这对我来说很有效,复制如下:

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"
    }
}

这篇关于注意:有关详细信息,请使用-Xlint:deprecation重新编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 05:02