Android studio compilation problem

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.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325393433&siteId=291194637