当我打开“属性” – > “Java构建路径” – > “Source”,默认输出文件夹是
@H_301_6@<project_name>/bin/classes我改成了
@H_301_6@<project_name>/bin保存并清理 – 构建此项目.它变回了
@H_301_6@<project_name>/bin/classes这是在我将ADT插件更新到15.0.1之后发生的
一些配置:
@H_301_6@Eclipse: Eclipse IDE for Java Developers<br/> Version: Indigo Service Release 1<br/> Build id: 20110916-0149 ADT Version: 15.0.1.v201111031820-219398 OS: Mac 10.7.2 SCM: Git 1.7.4.4任何建议表示赞赏.
谢谢,
约翰尼
解决方法
Change to the bin output folder. While the Ant build system puts the
output of javac in bin/classes/,the configuration of the Android
projects in Eclipse uses bin/,like standard Java projects. This has
always been a small problem because we put other files in there (like
the apk and dex files),but also need to use this folder as the source
of the dex step. Thankfully,dex would just ignore those files. Since
we started putting resource items in there too (png crunch cache),we
decided to change the project output (as far as the JDT is concerned)
to bin/classes/. ADT still uses bin/ as its top-level output folder
for Android specific files. The visible side effect is that bin/ will
now show up in the Package Explorer view (but not bin/classes/ as JDT
hides the only output folder it knows about).
这似乎暗示Android拥有自己的构建设置并替换JDT构建设置(即Properties-> Java Build Path-> Sources下的“output folder”)以匹配.
博客“A Little Madness”描述了如何通过在项目的根文件夹中添加/更改文件build.properties来更改ADT Ant的out.dir属性.您还可以使用build.properties更改gen.dir的位置.
@H_301_6@out.dir=bin gen.dir=gen请注意,Eclipse在过去使用外部工具修改其输出文件夹中的类时遇到了问题,因此可能出现out.dir = bin / classes.
免责声明:我还没有尝试过这个.这个建议可能没有解决任何问题,导致不同的问题,或希望工作.