簡體   English   中英

無關的更改后,Espresso測試失敗

[英]Espresso tests failing after unrelated changes

我進行了濃縮咖啡測試。 不幸的是,經過一些隨機更改后,我所有的測試都失敗了。 而且我從未看過此錯誤消息:

錯誤信息:-

java.lang.NoSuchMethodError: No interface method trackUsage(Ljava/lang/String;)V in class Landroid/support/test/internal/runner/tracker/UsageTracker; or its super classes (declaration of 'android.support.test.internal.runner.tracker.UsageTracker' appears in /data/app/mu.organyze.test-1/base.apk)

這是我的依賴項:

dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
            exclude group: 'com.android.support', module: 'support-annotations'
        })

        compile 'com.android.support:appcompat-v7:26.1.0'
        compile 'com.android.support.constraint:constraint-layout:1.0.2'
        compile 'com.google.firebase:firebase-auth:10.0.1'
        compile 'com.google.firebase:firebase-database:10.0.1'
        testCompile 'junit:junit:4.12'

        testCompile 'com.android.support.test:rules:1.0.1'
        testCompile 'com.google.dexmaker:dexmaker:1.2'
        testCompile 'org.mockito:mockito-core:2.12.0'
        testCompile 'org.mockito:mockito-android:2.12.0'


        androidTestCompile 'com.android.support:support-annotations:26.1.0'
        androidTestCompile 'com.android.support.test:runner:1.0.1'
        androidTestCompile 'com.android.support.test:rules:1.0.1'
        androidTestCompile 'org.mockito:mockito-core:2.12.0'
        androidTestCompile 'com.google.dexmaker:dexmaker:1.2'
        androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2'


        androidTestUtil 'com.android.support.test:orchestrator:1.0.1'
        androidTestCompile 'org.hamcrest:hamcrest-integration:1.3'
    }

只需將其添加到依賴項:

com.android.support.test.espresso:espresso-core:3.0.0

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM