Conflict with dependency 'com.android.support:support-annotations'. Resolved versions for app (23.3.0) and test app (23.1.1) differ

后端 未结 6 1408
挽巷
挽巷 2020-12-31 00:42

I came across this exception while adding espresso to an android project. I already try the link that comes with this exception

**Conflict with dependency \'         


        
6条回答
  •  滥情空心
    2020-12-31 01:14

    This solve the problem 'Resolved versions for app (24.0.0-beta1) and test app (23.0.1) differ' for me.

    android{    
        configurations.all {
            resolutionStrategy.force 'com.android.support:support-annotations:23.0.1'
        }
    }
    

    And do not forget to add following code, if you want to run the AndroidTest

     defaultConfig {
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    

提交回复
热议问题