【发布时间】:2012-02-08 19:23:39
【问题描述】:
我在运行 Android 仪器测试时收到 IllegalAccessError。
这是 Logcat 输出:
java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation
这是我的设置:
TestProject 测试UnderTestProject,在构建路径中包含AnotherProject(在“项目”选项卡中),并从“订购和导出”选项卡中导出它。被测类属于AnotherProject。
我已按照此处this stackoverflow question 中的建议配置构建路径。
构建是使用 Maven 从命令行完成的。 AnotherProject 位于 TestProject 和 UnderTestProject 的 pom 文件中,作为依赖项。这是仍然收到错误的原因吗?我怎样才能解决这个问题?仅在 UnderTestProject 的 pom 中包含 AnotherProject 并在 TestProject 的 pom 中包含 UnderTestProject?
eclipse 的构建路径如何与 maven 的 pom 绑定?
我不清楚这一点,任何帮助将不胜感激。
谢谢!
我尝试了以下方法,但仍然遇到问题:
- 从
TestProject的pom 中删除了AnotherProject,并在其中添加了UnderTestProject。 - 按照this thread. 上的建议,如果我为
AnotherProject添加<scope>provided</scope>,我的UnderTestProject甚至都无法构建。
我被困在这一点上,如果你有出路,请告诉我。
谢谢!
【问题讨论】:
标签: android maven instrumentation buildpath