迁移到Espresso 3.0.2 Cant时,找到引用的类com.google.android.apps.common.testing.testrunner.web.Conduit

时间:2018-10-08 20:18:11

标签: android android-gradle proguard android-espresso android-proguard

我正在尝试将浓缩咖啡升级到3.0.2,但是Proguard却遇到了问题。我看到的错误是

Warning: android.support.test.espresso.web.action.JavascriptEvaluation$AsyncConduitEvaluation: can't find referenced class com.google.android.apps.common.testing.testrunner.web.Conduit

在build.gradle中有以下内容

androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.2') {
        exclude group: 'com.android.support', module: 'support-annotations'
    }
    androidTestImplementation('com.android.support.test.espresso:espresso-contrib:3.0.2') {
        exclude group: 'com.android.support', module: 'support-annotations'
    }
    androidTestImplementation 'com.android.support.test.espresso:espresso-intents:3.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-accessibility:3.0.2'
    androidTestImplementation('com.android.support.test.espresso:espresso-web:3.0.2') {
        exclude group: 'com.android.support'
    }
    androidTestImplementation 'com.android.support.test.espresso.idling:idling-concurrent:3.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-idling-resource:3.0.2'
    androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.3'
    androidTestImplementation('com.google.guava:guava:26.0-android'){
        exclude group:'com.google.code.findbugs'
    }

我的测试apk的维护者有

-dontobfuscate
-dontoptimize    
-dontpreverify

-dontwarn org.kobjects.**
-dontwarn org.ksoap2.**
-dontwarn org.kxml2.**
-dontwarn org.xmlpull.v1.**

-keep class org.kobjects.** { *; }
-keep class org.ksoap2.** { *; }
-keep class org.kxml2.** { *; }
-keep class org.xmlpull.** { *; }

-dontwarn javax.annotation.**
-dontwarn javax.inject.**
-dontwarn sun.misc.Unsafe

-dontwarn afu.org.checkerframework.**
-dontwarn org.checkerframework.**
-dontwarn com.google.errorprone.**
-dontwarn java.lang.ClassValue

我尝试使用keep类值设置proguard文件,也尝试不使用proguard,但无法弄清楚。

0 个答案:

没有答案