java .lang .SecurityException: class "org .hamcrest .Matchers "'s signer information does not match signerinformation of other classes in the same package
该错误的原因是:我在这里引用了hamcrest-all,而JUnit内部也使用了hamcrest,所以在加载类的时候版本顺序出了错误,只要调整一下hamcrest-all包的位置改在JUnit包之前即可
修改工程下 .classpath 文件: 如下图将 hamcrest-all 引入移到junit前
参照:
http://qiuguo0205.iteye.com/blog/555693