AS创建项目常见问题解决

1,Conflict with dependency 'com.android.support:support-annotations'. Resolved versions for app (22.2.1) and test app (27.1.1) differ. See http://g.co/androidstudio/app-test-app-conflict for details.

解决方法

app moudle 的build.grade文件中

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'


添加   

configurations.all {
    resolutionStrategy.force 'com.android.support:support-annotations:27.1.1'
}
 
  
annotations
版本号对应 test app (27.1.1)

你可能感兴趣的:(android)