22

我刚刚下载了新的 LWUIT 1.5,当我编译我的项目时,我在输出跟踪中看到了这些行:

Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

我使用 Sun Java ME SDK 3.0

那么如何进行-Xlint重新编译呢?

4

3 回答 3

13

根据较早的 SO 问题中的评论,“NetBeans 中的 -Xlint 设置在项目属性、运行或编译选项下” - 请参阅此处的详细信息:NetBeans 中的编译问题

Netbeans 论坛上也有一个主题。他们说,

转到项目属性的编译部分。这是一个标有“报告使用已弃用 API”的复选框。检查这将打开 -Xlint。

于 2011-09-19T16:11:06.190 回答
2

我为此尝试了多种解决方案,其中一些在下面给出

  1. 在下面添加代码Android/app/build.gradle file

    configurations {
     compile.exclude group: 'com.google.zxing'
    }
    
  2. 添加android:usesCleartextTraffic="true"到文件路径android/app/src/main/AndroidManifest.xml它应该如下所示:

     <application
            android:name="io.flutter.app.FlutterApplication"
            android:label="app_name"
            android:icon="@mipmap/ic_launcher"
            android:usesCleartextTraffic="true">
    
于 2021-01-06T10:01:19.707 回答
-2

如果您替换不推荐使用的功能,您的错误将得到解决。像 Android Studio 这样的 IDE 会用波浪线显示它们,一些 IDE 会建议您可以轻松使用的替代品。

于 2021-02-24T00:03:32.497 回答