When compiling java code in Android Studio, a similar warning appears:
- For details, recompile with -Xlint:deprecation.
- For details, recompile with -Xlint:unchecked.
, go to the project's corresponding build.gradle and add the configuration:
1
2
3
4
5
6
7
|
allprojects {
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs <<
"-Xlint:unchecked"
<<
"-Xlint:deprecation"
}
}
}
|
The warning will be dismissed.