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

后端 未结 9 1841
难免孤独
难免孤独 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 07:11

    I got this error because I was working with Guava and Espresso also contains Guava.

    If you use Gradle and Android Studio you can exclude packages from the dependency like this:

    androidTestCompile('com.jakewharton.espresso:espresso:1.1-r3') {
       exclude group: 'com.google.guava'
    }
    

提交回复
热议问题