在使用android自动化测试工具uiautomator的时候,发现adt自带的junit框架的版本是junit 4, 而uuiautomator依赖的是junit 3。按照官方给出的做法:
From the Project Explorer, right-click on the new project that you created, then select Properties > Java Build Path, and do the following:
From the Project Explorer, right-click on the new project that you created, then select Properties > Java Build Path, and do the following:
Click Add Library > JUnit then select JUnit3 to add JUnit support.
提示 The selected JUnit version is not available.
所以直接去下载junit3的jar包, junit的官方没有提供旧版本的下载地址,还好http://mvnrepository.com/artifact/junit/junit/3.8.1
这里提供下载,而且不需要其他依赖文件,只需要把jar包下载来,然后Add External JARs把它加进来就可以使用