Error:Execution failed for task ':app:preDebugAndroidTestBuild'.

Error:


Error:Execution failed for task ':app:preDebugAndroidTestBuild'.
> Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (26.1.0) and test app (27.1.1) differ. See https://d.android.com/r/tools/test-apk-dependency-conflicts.html for details.


solution:

解决办法:在 build.gradle 添加

android {
    ...
}

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

dependencies {
    ...
}



原文链接: Error:Execution failed for task ':app:preDebugAndroidTestBuild'. 版权所有,转载时请注明出处,违者必究。
注明出处格式:流沙团 ( https://gyarmy.com/post-474.html )

发表评论

0则评论给“Error:Execution failed for task ':app:preDebugAndroidTestBuild'.”