I am getting the IllegalAccessError while running Android instrumentation tests.
This is Logcat output:
java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation
This is my setup:
TestProject
tests UnderTestProject
, which includes AnotherProject
in the buildpath (in 'Projects' tab), and exports it from 'Order and Export' tab. The class under test belongs to AnotherProject
.
I have followed the suggestion in this stackoverflow question here for configuring build path.
The builds are being done using Maven, from command line. AnotherProject
is in the pom file for both TestProject
and UnderTestProject
, as dependency. Is this the reason for still getting the error? How can I fix this? Include AnotherProject
in pom only for UnderTestProject
and include UnderTestProject
in the TestProject
's pom?
How does eclipse's build path tie up with maven's pom?
I am not clear about this, and any help would be greatly appreciated.
Thanks!
I tried the following, and still getting the problem:
- Removed
AnotherProject
fromTestProject
's pom, and addedUnderTestProject
to it. - Followed the advice on this thread. My
UnderTestProject
doesn't even build if I add<scope>provided</scope>
forAnotherProject
.
I am stuck at this point, please let me know if you have a way out.
thanks!