Android Studio布局页面报错【Design editor is unavailable until a successful build】

  每次更新AndroidStudio都会出现一堆问题,今天更新完后Android Studio后就发现布局页面不知道哪里去了(内心瞬间万马奔腾,@#@%@#@…)。。。
Android Studio布局页面报错【Design editor is unavailable until a successful build】

报错原因:
Design editor is unavailable until a successful build.
设计编辑器不可用,直到成功构建为止。(构建不成功?!)

Error:Execution failed for task ‘:app:preDebugAndroidTestBuild’.
Resolved versions for app (26.1.0) and test app (27.1.1) differ.
解决版本的应用程序(21.1.0)和测试应用程序(27.1.1)不同。

所以问题是 ——版本冲突,于是在external library中寻找
发现报错项目中有两个com.android.support:support-annotations
Android Studio布局页面报错【Design editor is unavailable until a successful build】
解决方案:
在app下的build.gradle文件中的dependences {}中添加如下代码:

dependencies {
  androidTestCompile('com.android.support:support-annotations:26.1.0') {
        force = true
    }
...
}