Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't change default output folder

all

I can't change the default output folder in Eclipse.

When I open "Properties" -> "Java Build Path" -> "Source", the default output folder is

<project_name>/bin/classes

I changed it to

<project_name>/bin

save and clean-build this project. It changed back to

<project_name>/bin/classes

This happened after I updated my ADT plugin to 15.0.1

Some configurations:

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

Any suggestions are appreciated.

Thanks, Johnny

like image 760
Johnny Avatar asked Nov 30 '11 06:11

Johnny


1 Answers

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.

like image 157
Justin C Avatar answered Sep 29 '22 05:09

Justin C