这个问题在这里已有答案:
5137
2018-01-27 19:44
起源
enterra-inc.com/techzone/... 可能会有所帮助
答案:
Android SDK的解决方法是设置 build.sysclasspath
财产 "last"
这将抑制虚假警告。
通过在项目中分配属性值来完成此操作 build.properties
文件。
# You can use this to override default values such as
# 'source.dir' for the location of your java source folder and
# 'out.dir' for the location of your output folder.
out.dir=build
gen.dir=build/gen
# Suppress the javac task warnings about "includeAntRuntime"
build.sysclasspath=last
14
2018-03-17 22:31
谢谢,它有效 - dongshengcn
build.properties也称为ant.properties吗? - Sam Wilson
@Sam是的。 - prolink007
我还没有找到build.properties,在创建此文件后,仍会打印此警告。但将其添加到project.properties将解决此问题。在创建android项目时,我可以配置我的SDK以使此代码自动添加到project.properties吗? - Frank Cheng
这是由Ant 1.8中引入的错误引起的。只需将该名称的属性添加到 javac
任务,将其设置为false,并忘记它曾发生过。
即。设置attribue includeAntRuntime
在你的 javac
Ant任务。 Ant用户手册提供以下属性描述:“属性 includeAntRuntime
默认为yes,除非设置了build.sysclasspath。通常最好将此设置为false,以便脚本的行为对运行它的环境不敏感“。
1
2018-01-27 21:16
感谢您的评论。实际上这很容易修复,但不适用于Android SDK。目标在android sdk脚本中定义。 - dongshengcn