Can't change default output folder

给你一囗甜甜゛ 提交于 2019-12-05 05:48:22

From Android Changes in Revision 14:

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).

This seems to imply that Android has it's own build settings and replaces the JDT build settings (i.e. "output folder" under Properties->Java Build Path->Sources) to match.

The blog "A Little Madness" describes how to change the out.dir property of ADT's Ant by adding/changing the file build.properties in your project's root folder. You can also change the location of gen.dir with build.properties.

out.dir=bin
gen.dir=gen

Note that Eclipse has had problems in the past with external tools modifying classes in its output folder, and its possible that out.dir=bin/classes for this reason.

Disclaimer: I haven't tried any of this, yet. This suggestion may fix nothing, cause different problems, or, hopefully, work.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!