I get IllegalAccessError while testing Android hardware.
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 build path (on the Projects tab) and exports it from the Order and Export tab. The test class belongs to AnotherProject .
I followed this questionoverflow suggestion to set up the build path.
Build using Maven from the command line. AnotherProject is in the pom file for both TestProject and UnderTestProject as a dependency. Is this the reason for getting the error? How can i fix this? Include AnotherProject in pom for UnderTestProject only and include UnderTestProject in TestProject pom?
How is the eclipse build path related to maven pom?
I do not quite understand about this, and any help would be greatly appreciated.
Thanks!
I tried the following and still get the problem:
- Removed
AnotherProject from TestProject pom and added UnderTestProject to it. - Follow the tips of this thread. My
UnderTestProject doesn't even build if I add <scope>provided</scope> to AnotherProject .
I am stuck at this point, please let me know if you have a way out.
thanks!
source share