运行蚂蚁仪表测试时的NoClassDefFoundError [英] NoClassDefFoundError when running Instrumentation test with ant

查看:185
本文介绍了运行蚂蚁仪表测试时的NoClassDefFoundError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个测试目标项目A,并测试仪B项目。

I have a test target project A, and a tester project B.

项目A具有FlurryAgent.jar在libs文件夹。

Project A has FlurryAgent.jar in its libs folder.

项目B具有robotium独奏-3.1.jar在libs文件夹

Project B has robotium-solo-3.1.jar in its libs folder

当我编译并运行它们,

cd A
android update project -p .
cd ..
cd B
android update test-project -p . -m ../A
ant all clean debug
ant uninstall
ant installt
ant test

蚂蚁测试无法执行的测试:

ant test fails to execute tests:

test:
     [echo] Running tests ...
     [exec]
     [exec] com.example.r17.test.TestOne:
     [exec] INSTRUMENTATION_RESULT: shortMsg=java.lang.NoClassDefFoundError
     [exec] INSTRUMENTATION_RESULT: longMsg=java.lang.NoClassDefFoundError: com.flurry.android.FlurryAgent
     [exec] INSTRUMENTATION_CODE: 0

我读过一些职位/,以解决在Eclipse这个问题的问题。但我不认为我可以在无头的詹金斯从运行Eclipse。

I've read some posts/questions that solve this problem in Eclipse. But I don't think I can run Eclipse on headless Jenkins slave.

推荐答案

HTTP://$c$c.google.com/p/android/issues/detail ID = 27608

我提出的问题,谷歌和他们上传了一个临时的解决办法。此修复程序也将被包含在V18版本。

I submitted the issue to Google and they uploaded a temporary fix. The fix will also be included in v18 release.

项目成员X ... @ a​​ndroid.com,今天(34分钟前) 得到 http://tool​​s.android.com/download 的底部的anttasks.jar更换一个在你的SDK。

"project member x...@android.com, Today (34 minutes ago) get the anttasks.jar from the bottom of http://tools.android.com/download to replace the one in your sdk."

替换该文件是在\机器人\ Android的SDK \工具\ lib目录\

The file to replace is at \Android\android-sdk\tools\lib\

这篇关于运行蚂蚁仪表测试时的NoClassDefFoundError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆