Robotium - Eclipse中的API错误

时间:2014-10-29 04:57:28

标签: android eclipse testing robotium

我刚开始使用Robotium Recorder来自动化Android测试,每次我尝试录制脚本时都会显示错误。以下是错误详情。

我在Eclipse中安装了Robotium Recorder并创建了一个测试项目。我尝试使用Robotium Recorder记录测试,但是当我选择New Robotium Test时,即使在SDK Manager中安装了相应的API状态,也会显示以下错误。

enter image description here

enter image description here

enter image description here 请注意,我使用的是Eclipse Luna版本Luna SR1(4.4.1),Robotium Recorder版本2.1.17,还使用JAR文件robotium-solo-5.0.1进行测试项目。

enter image description here

寻找任何建议或帮助..

1 个答案:

答案 0 :(得分:2)

首先,切换到最新Robotium 版本 2.1.21

确保Android SDK文件夹(Android \ sdk \ tools \ lib \ find_java.exe)中的 Used_Java.exe与您正在运行的Windows版本兼容。检查计算机的系统信息,看看是否需要x86(32位)或x64(64位)版本的程序。

如果Used_Java.exe与windows兼容,那么还要确保与系统中运行的Windows不兼容的Android SDK不会被复制或存在于系统中,即使它没有被eclipse使用。如果它存在于系统中,则将其删除并重新启动eclipse。现在您可以通过Robotium Recorder记录测试:)