微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

android – 无法更改默认输出文件夹

所有

我无法在Eclipse中更改输出文件夹.

当我打开“属性” – > “Java构建路径” – > “Source”,输出文件夹是

<project_name>/bin/classes

我改成了

<project_name>/bin

保存并清理 – 构建此项目.它变回了

<project_name>/bin/classes

这是在我将ADT插件更新到15.0.1之后发生的

一些配置:

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

任何建议表示赞赏.

谢谢,
约翰尼

解决方法

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

这似乎暗示Android拥有自己的构建设置并替换JDT构建设置(即Properties-> Java Build Path-> Sources下的“output folder”)以匹配.

博客“A Little Madness”描述了如何通过在项目的根文件夹中添加/更改文件build.properties来更改ADT Ant的out.dir属性.您还可以使用build.properties更改gen.dir的位置.

out.dir=bin
gen.dir=gen

请注意,Eclipse在过去使用外部工具修改输出文件夹中的类时遇到了问题,因此可能出现out.dir = bin / classes.

免责声明:我还没有尝试过这个.这个建议可能没有解决任何问题,导致不同的问题,或希望工作.

原文地址:https://www.jb51.cc/android/315933.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐