java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation getting while running test project?

后端 未结 9 1848
难免孤独
难免孤独 2020-11-29 06:37

I have implemented project by using third party library(zxing) after implementation project is working fine then after I have written one test project to unit test my projec

9条回答
  •  没有蜡笔的小新
    2020-11-29 06:58

    It is because zxing jar files are being loaded twice, You must set the zxing library as "Provided" (if you are compiling your code using Maven) in compile time, so it does not add the library to your bytecode. that way you wouldn't get the error

提交回复
热议问题