注意:有关详细信息,请使用-Xlint:deprecation重新编译.(已解决) [英] Note: Recompile with -Xlint:deprecation for details.(Solved)
本文介绍了注意:有关详细信息,请使用-Xlint:deprecation重新编译.(已解决)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
注意:-:-----.java使用或覆盖已弃用的API.
Note: --:-----.java uses or overrides a deprecated API.
注意:有关详细信息,请使用-Xlint:deprecation重新编译.
Note: Recompile with -Xlint:deprecation for details.
推荐答案
要解决此问题,您需要转到 Gradle脚本,然后点击 build.gradle 在 buildscript 之后,您需要添加
To solve this problem you need to go Gradle Scripts the click on build.gradle after buildscript you need to add
gradle.projectsEvaluated {
tasks.withType(JavaCompile){
options.compilerArgs << "-Xlint:deprecation"
}
}
例如:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.3'
classpath 'com.google.gms:google-services:4.3.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile){
options.compilerArgs << "-Xlint:deprecation"
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
这篇关于注意:有关详细信息,请使用-Xlint:deprecation重新编译.(已解决)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文