我想在构建 android 应用程序时将 -Xlint:deprecated 添加到 java 编译器。
我在 javac 标签中看到了 compilerarg 标签,但是为标准项目生成的 build.xml 没有这样的标签。
有什么提示吗?
最佳答案
完整的构建脚本位于 YOUR_SDK_FOLDER/platforms/SDKVERSION/templates/android_rules.xml
您使用此文件的副本修改您的 build.xml 并自定义它。不确定它是否会到达您想要的位置 - 但这是一个开始
<!-- Execute the Android Setup task that will setup some properties specific to the target,
and import the rules files.
To customize the rules, copy/paste them below the task, and disable import by setting
the import attribute to false:
<setup import="false" />
This will ensure that the properties are setup correctly but that your customized
targets are used.
-->
关于android - 将编译器标志添加到标准的 android build.xml,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2852254/