Проблема исходит от окружающего "символа в значении вашего свойства из файла gradle.properties . Свойство необходимо настроить в gradle.properties следующим образом:
RELEASE_STORE_FILE=D:\\My Folder\\Android\\android.javakeystore.keystore.jks
или
RELEASE_STORE_FILE=D:/My Folder/Android/android.javakeystore.keystore.jks
Gradle сохраняет символ "из значения свойств, поэтому, если вы попробуете что-то подобное:
file(RELEASE_STORE_FILE).exits() // if RELEASE_STORE_FILE contains " char, it will fail
Другие примеры, иллюстрирующие это:
gradle.properties
cert_path_1=c:/my certs/cert.txt
cert_path_2="c:/my certs/cert.txt"
cert_path_3="c:\\my certs\\cert.txt"
cert_path_4=c:\\my certs\\cert.txt
build.gradle
void testFile(String message, String fileToTest){
println message
println " -> does the file exist? : " + file(fileToTest).exists() + "\n"
}
testFile("Testing property 'cert_path_1'", ext.cert_path_1)
testFile("Testing property 'cert_path_2'", ext.cert_path_2)
testFile("Testing property 'cert_path_3'", ext.cert_path_3)
testFile("Testing property 'cert_path_4'", ext.cert_path_4)
Результат:
Testing property 'cert_path_1'
-> does the file exist? : true
Testing property 'cert_path_2'
-> does the file exist? : false
Testing property 'cert_path_3'
-> does the file exist? : false
Testing property 'cert_path_4'
-> does the file exist? : true