问题
Note: --:-----.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
回答1:
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"
    }
}
For example :
  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
 }
来源:https://stackoverflow.com/questions/61702748/note-recompile-with-xlintdeprecation-for-details-solved