При выполнении шагов на https://developer.android.com/studio/build/gradle-tips#remove-private-signing-information-from-your-project, я получаю следующую ошибку, и приложение Cordova Android не собирается:
/platforms/android/build.gradle': 82: Invalid variable name. Must start with a letter but was: ‘proguard
Строка 82:
proguardFiles getDefaultProguardFile(‘proguard-android.txt’), ‘proguard-rules.pro’
Я не знаю, на что ссылается ошибка.Я не вижу переменных, начинающихся с чего-либо, кроме букв.Файл build.gradle включает в себя:
// Creates a variable called keystorePropertiesFile, and initializes it to the
// keystore.properties file.
def keystorePropertiesFile = rootProject.file("keystore.properties")
// Initializes a new Properties() object called keystoreProperties.
def keystoreProperties = new Properties()
// Loads the keystore.properties file into the keystoreProperties object.
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
// https://developer.android.com/studio/build/gradle-tips#remove-private-signing-information-from-your-project
android {
buildTypes {
signingConfigs {
config {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
// you will normally want to enable ProGuard only for your release
// builds, as it’s an additional step that makes the build slower and can make debugging more difficult
release {
minifyEnabled true
proguardFiles getDefaultProguardFile(‘proguard-android.txt’), ‘proguard-rules.pro’
}
}
}