I updated the AndroidStudio to version 3.1
Clean Project...
and build failed
The SourceSet \'instrumentTest\' is not recognized by the Androi
Try change distributionUrl in you gradle/wrapper/gradle-wrapper.properties to last vesion:
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
clean project and "Invalidate Cache/Restart" in File menu after this