android - 如何在 Android Studio 上执行 "Recompile with -Xlint:unchecked for details"?

标签 android android-studio flutter

我正在 Android Studio 上使用 Flutter 开发应用程序。

我见过这样的警告,但我不知道如何运行 Recompile with -Xlint:unchecked for details专门在 Android Studio 上。你能给我一些想法吗?

Warnings

我检查过的页面(但我认为它们与我的情况有点不同):

  • Recompile with -Xlint : unchecked for details
  • Deprecated compiling error
  • How to show the compile error's details on Android Studio?
  • 最佳答案

    在您的项目级别 build.gradle 文件中添加此内容并再次构建应用程序

    allprojects {
        repositories {
            google()
            jcenter()
        }
    
        gradle.projectsEvaluated{
            tasks.withType(JavaCompile){
                options.compilerArgs << "-Xlint:deprecation"
            }
        }
    
    
    }
    
    它将显示弃用警告。将它们升级到最新版本。希望这能解决您的问题

    关于android - 如何在 Android Studio 上执行 "Recompile with -Xlint:unchecked for details"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61648306/

    相关文章:

    android - 是否可以测试 Activity 类中的方法?

    android - 如何将字符串转换为十六进制?

    android - 静态BroadcastReceiver无法正常工作

    android - 模拟器无法启动

    flutter - 使用 SingleTickerProviderStateMixin 时热重载会抛出错误 #42054

    flutter - Dart/Flutter POST 请求和流响应

    android - 无法设置 JAVA_HOME

    android - 图像的字节数组到 imageview

    android - 在一定数量的行之后重复 recyclerview 行属性?

    flutter - LocalStorage 流未完成?