While configuring flavor signing in a separate .gradle file I got a sticky error telling:
flavorGermany.gradle: 1: unable to resolve class com.android.ide.common.signing.KeystoreHelper
In flavorGermany.gradle the KeystoreHelper is used this way:
android {
signingConfigs {
germany {
storeFile = file(KeystoreHelper.defaultDebugKeystoreLocation());
storePassword = "some_password";
keyAlias = "some_key";
keyPassword = "some_other_key";
}
}
// other configs ...
}
To fix this I had to add this before the 'android' definition:
buildscript {
repositories {
mavenCentral()
}
dependencies {
// Android gradle plugin
classpath 'com.android.tools.build:gradle:2.1.3'
}
}
With this change the import error has gone and the Android Studio was able to recognize the additional flavor described in a separate .gradle file.