gpt4 book ai didi

java - 预验证类中的 Android 错误类引用解析为意外实现

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:15:52 24 4
gpt4 key购买 nike

我在 Android Espresso 测试中遇到过这个问题。但这在运行/编译时效果很好。我知道这个错误有几个线索,但我一直无法找到符合我的情况的修复方法。我目前正在处理一个

"java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation".

我已经添加了

androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2') {
exclude group: 'com.android.support', module: 'support-v4'
}

但是还是不行。有人可以帮我解决这个问题吗?谢谢。

这是我的依赖

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
/*Android Testing*/
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'

/*Showcase view for Facebook Intregation*/
compile 'com.facebook.android:facebook-android-sdk:4.7.0'
/*Showcase view for SwipeRefresh*/
compile 'com.baoyz.pullrefreshlayout:library:1.2.0'
/*Multidex*/
compile 'com.android.support:multidex:1.0.1'
/*Crashlytics*/
compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
transitive = true;
}
}

最佳答案

改变

androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2') {
exclude group: 'com.android.support', module: 'support-v4'
}

  androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2.1') {
exclude group: 'com.android.support', module: 'appcompat'
exclude group: 'com.android.support', module: 'support-v4'
exclude module: 'recyclerview-v7'
}

希望对你有帮助

关于java - 预验证类中的 Android 错误类引用解析为意外实现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35336006/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com