错误:Execution failed for task ':ActivityLife:preDebugAndroidTestBuild'.
> Conflict with dependency 'com.android.support:support-annotations' in project ':ActivityLife'. 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.
只需在dependencies代码块中添加:
androidTestCompile('com.android.support:support-annotations:26.1.0') { force = true }
rebuilt解决