如何在 Ant 构建任务中使用 -Xlint:unchecked 重新编译?
当我运行 Ant“build.xml”文件的“compile”目标时,我收到以下消息:
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
我的编译目标如下:
<target name="compile">
<javac srcdir="${src.dir}" destdir="${classes.dir}" debug="true" debuglevel="lines,source" includeantruntime="false">
<classpath refid="class.path" />
</javac>
<javac srcdir="${test.dir}" destdir="${classes.dir}" debug="true" debuglevel="lines,source" includeantruntime="false">
<classpath refid="class.path" />
</javac>
</target>
我必须在 build.xml 文件中更改什么,以便 - Xlint:unchecked 在那里完成了?
When I run the "compile" target of my Ant "build.xml" file, then I get the following message:
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
My compile target is the following:
<target name="compile">
<javac srcdir="${src.dir}" destdir="${classes.dir}" debug="true" debuglevel="lines,source" includeantruntime="false">
<classpath refid="class.path" />
</javac>
<javac srcdir="${test.dir}" destdir="${classes.dir}" debug="true" debuglevel="lines,source" includeantruntime="false">
<classpath refid="class.path" />
</javac>
</target>
What do I have to change in my build.xml file so that -Xlint:unchecked is done there?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在
部分添加以下元素:Add the following element in
<javac></javac>
section:在 AndroidStudio 中,执行以下操作:
In AndroidStudio, do this: