Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Note: Recompile with -Xlint:deprecation for details.(Solved)

Note: --:-----\.java uses or overrides a deprecated API.

Note: Recompile with -Xlint:deprecation for details.
like image 606
Mukta Avatar asked Dec 18 '22 13:12

Mukta


1 Answers

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
 }
like image 170
Mukta Avatar answered Apr 17 '23 16:04

Mukta