所以当我编译我的 android 应用程序时,我几乎总是会收到这样的消息:
[javac] Note: /home/kurtis/sandbox/udj/androidApp/src/org/klnusbaum/udj/PlaylistFragment.java uses or overrides a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
如何使用此选项重新编译?我是否必须在 build.xml 中编辑某些内容?
最佳答案
这些属性也可以在 Ant 命令行上定义,避免编辑:
ant "-Djava.compilerargs=-Xlint:unchecked -Xlint:deprecation"调试
启用所有 Lint 警告:
ant -Djava.compilerargs=-Xlint debug
关于java - 使用 Xlint :deprecation with android,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7682150/