dehengxu / android-mock

Automatically exported from code.google.com/p/android-mock
0 stars 0 forks source link

Eclipse setup instructions need to be updated for ADT14 #17

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The latest version of the Android Developer Tools plugin for Eclipse (ADT14) 
has changed the output folder for the classes built by javac from "/bin" to 
"/bin/classes" for Android Eclipse projects. See 
http://developer.android.com/sdk/eclipse-adt.html.

This means that any Eclipse projects setup to use Android Mock using the 
existing instructions 
(http://android-mock.googlecode.com/files/AndroidMockinEclipse.pdf) will fail 
as the mock generator will be looking in the wrong place for classes to mock, 
and will be outputting generated mocks to the wrong output folder. 

The document should be updated to reflect the new build folder.

Original issue reported on code.google.com by t...@leach.it on 20 Oct 2011 at 12:11

GoogleCodeExporter commented 8 years ago
Google should reverse this change!!!

Original comment by paul....@gmail.com on 31 Oct 2011 at 8:36

GoogleCodeExporter commented 8 years ago
It broke our build and people wasted time on locating this issue!!!

Original comment by paul....@gmail.com on 31 Oct 2011 at 8:38

GoogleCodeExporter commented 8 years ago
Just by changing APP_UNDER_TEST to include '/bin/classes' may not work for all 
cases. ADT14/15 has also changed the way Android Library is built. In short, 
the library source files are no longer being copied to the main project before 
a build, therefore the annotation process will fail. The Android library 
projects will instead compiled into JAR files that the main project can 
reference. 

Looks like android-mock needs a way to reference those JAR files.

Original comment by mydroids...@gmail.com on 7 Nov 2011 at 6:26

GoogleCodeExporter commented 8 years ago
Hi,

this is a top urgent matter. I cannot go back to ADT 12 'cause of SDK level 8 
support.

Is there any fast fix solution I can do locally ?

Original comment by mutscher...@googlemail.com on 1 Dec 2011 at 7:14

GoogleCodeExporter commented 8 years ago
Due to recent changes, ADT 14 has updated the location where the classes are 
output. Before, the default location was /bin now it is /bin/classes. With 
these new changes, you have to make the following changes to your project (in 
eclipse) for android mock to work correctly:

APP_UNDER_TEST should point to your project' bin/classes folder.
bin_dir should point to your test project's bin/classes folder.

Original comment by sskha...@google.com on 8 Dec 2011 at 8:09

GoogleCodeExporter commented 8 years ago
Seems to me to correct in eclipse would be:

-APP_UNDER_TEST points to main project bin/classes
-bin_dir test bin/classes
under source tab add library project bin/classes

should not have to change the build.xml supplied with android sdk too much or 
not at all.

Original comment by fred.gr...@gmail.com on 18 Dec 2011 at 1:13

GoogleCodeExporter commented 8 years ago
Which "source tab" do you mean ? "Library project" is your main project ? Is 
your main project a library project (no it isn't, or ?) ?

I'm not able to get this running.

Original comment by mutscher...@googlemail.com on 15 Mar 2012 at 12:04