Android Unit Testing - Resolution & Verification Problems
Posted
by Bill
on Stack Overflow
See other posts from Stack Overflow
or by Bill
Published on 2010-03-08T18:26:51Z
Indexed on
2010/04/20
19:33 UTC
Read the original article
Hit count: 201
I just switched the way my Android project is being built and non of my unit tests work any more...I get errors like
WARN/dalvikvm(575): VFY: unable to resolve static field X in .....
WARN/dalvikvm(575): VFY: unable to find class referenced in signature
These errors only come from my Unit Tests, where classes defined in it can't even see other classes defined in the unit test.
Before each project had its own directory with copies of the 3rd party jar files. I've read around that Dex does weird things with references but haven't been able to figure out how to fix this problem. Is there a better way to do this? I would love to see an example of a large Android workspace where there are multiple projects, jar references, etc...
Is it possible to fix this with an Order/Export tweak ?
The project is structured like this:
- Eclipse Workspace (PROJECT_HOME classpath variable)
- lib
- 3rd-party jars
- android.jar
- Java Project A
- Looks in PROJECT_HOME
- Java Project B
- Looks in PROJECT_HOME
- Depends on project A
- Android Project
- Depends on A & B
- Looks in PROJECT_HOME
- Android Test Project
- Depends on A , B, Android Project
- Looks in PROJECT_HOME
© Stack Overflow or respective owner