Android Espresso Issue - Dependency conflict

前端 未结 8 1889
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

    As stated in the google documentation: https://sites.google.com/a/android.com/tools/tech-docs/new-build-system/user-guide#TOC-Resolving-conflicts-between-main-and-test-APK

    The way to resolve is to explicitly set the support library in androidTestCompile to the version you are using in the project.

    if for example you are using support library version 25.0.1 just add

    androidTestCompile 'com.android.support:support-annotations:25.0.1'
    

    in your build.gradle configuration

提交回复
热议问题