Android Espresso Issue - Dependency conflict

前端 未结 8 1909
Happy的楠姐
Happy的楠姐 2021-02-12 16:34

I\'m trying to integrate espresso into my application for ui testing. Here are my dependencies in Gradle

dependencies {
    compile fileTree(dir: \'libs\', inclu         


        
8条回答
  •  爱一瞬间的悲伤
    2021-02-12 17:04

    I had to combine the following versions for L release after receiving a similar dependency conflict between project and test app:

    android {
        useLibrary 'org.apache.http.legacy'
        compileSdkVersion 23
        buildToolsVersion '23.0.1'
        defaultConfig {    
            minSdkVersion 14
            targetSdkVersion 23
        }
    }
    dependencies {
        compile 'com.android.support:appcompat-v7:23.0.1'
        compile 'com.android.support:support-v4:23.0.1'
    
        androidTestCompile 'com.android.support.test:runner:0.4'
        androidTestCompile 'com.android.support.test:rules:0.4'
        androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.1'
        androidTestCompile 'com.android.support.test.espresso:espresso-intents:2.2.1'
    }
    

    useLibrary was needed since we use org.apache.http imports, see https://github.com/bitstadium/HockeySDK-Android/issues/80

提交回复
热议问题