mtrakal's solution worked fine.
Added to gradle.build:
buildscript {
repositories {
maven { url 'https://maven.google.com' }
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha2'
// NOTE: Do not place your application dependencies here;
// they belong in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
Then it automatically upgraded to alpha2.
Invalidate the caches and restarted all is fine.
File | Invalidate Caches / Restart
choose 'Invalidate & Restart'