
这是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.上的建议,如果我添加< scope>提供< / scope>,我的UnderTestProject甚至不会构建对于AnotherProject.
我被困在这一点,如果你有出路,请告诉我.
谢谢!
解决方法 首先,按照androID-maven-plugin wiki页面 here上的librarIEs部分进行 *** 作:If your project set-up contains librarIEs then those too need to be added as <scope>provIDed</scope> otherwise they will be added to the test which will result in a duplication the error «Class ref in pre-verifIEd class resolved to unexpected implementation».
… …
Note BUG # 142,only librarIEs with <packaging>jar</packaging> will work at this point.
然后右键单击UnderTestProject,单击Build Path – >配置构建路径,在“订单和导出”选项卡中勾选Maven依赖项:
这对我有用,希望它有所帮助.
总结以上是内存溢出为你收集整理的android instrumentation测试:IllegalAccessError全部内容,希望文章能够帮你解决android instrumentation测试:IllegalAccessError所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)