注意:使用-Xlint:deprecation重新编译以了解详情。(已解决)

问题描述 投票:0回答:1

注意:使用-Xlint:deprecation重新编译以了解详情。

gradle android-manifest
1个回答
0
投票

要解决这个问题,你需要去 Gradle脚本 点击 build.gradle之后 构建脚本 您需要添加

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
 }
© www.soinside.com 2019 - 2024. All rights reserved.