I ran into this problem when testing Android Espresso. But this works well on startup / compilation. I know that this error has several threads, but I could not find a fix that fits my situation. I am currently dealing with
"java.lang.IllegalAccessError: the ref class in the pre-tested class is allowed for unexpected implementation."
I have already added
androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2') {
exclude group: 'com.android.support', module: 'support-v4'
}
But it still does not work. Can someone help me with this problem. Thanks.
Here are my addictions
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile 'com.android.support.test:runner:0.3'
androidTestCompile 'com.android.support.test:rules:0.3'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2'
androidTestCompile 'com.android.support.test.espresso:espresso-idling-resource:2.2.1'
androidTestCompile 'com.android.support:support-annotations:23.0.1'
androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2') {
exclude group: 'com.android.support', module: 'support-v4'
}
compile 'com.google.android.gms:play-services:8.3.0'
compile 'com.android.support:support-v4:23.0.+'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.mcxiaoke.volley:library:1.0.18'
compile 'commons-codec:commons-codec:1.9'
compile 'com.facebook.android:facebook-android-sdk:4.7.0'
compile 'com.baoyz.pullrefreshlayout:library:1.2.0'
compile 'com.android.support:multidex:1.0.1'
compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
transitive = true;
}
}
source
share