I'm using Android Studio 1.1.0. When I try to sync my Gradle file, I get the following error:
Gradle DSL method not found:storeFile()
Here is my gradle configuration:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "skripsi.ubm.studenttracking"
minSdkVersion 16
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
signingConfigs {
release {
storeFile (project.property("Students_tracking_keystore.jks") + ".keystore")
storePassword "####"
keyAlias "####"
keyPassword "#####"
}
}
}
Can anyone help?
A couple of things to note:
The storeFile
DSL method has the following signature:
public DefaultSigningConfig setStoreFile(File storeFile)
i.e. it expects a File
to be passed in. You probably need to place a File
constructor in your code to ensure you are actually creating a File
object. Because you're currently not passing in a file, Gradle is complaining that it can't find a method with the appropriate signature.
Secondly, you are currently appending two suffices to the filename: .jks
and .keystore
. You should only include one of these based on the suffix of the file you are referencing (it's probably .jks
, but you should check to be sure).
In short, one of the following replacement lines will probably work for you:
storeFile file(project.property("Students_tracking_keystore") + ".keystore")
or
storeFile file(project.property("Students_tracking_keystore") + ".jks")
or
storeFile file(project.property("Students_tracking_keystore.keystore"))
or
storeFile file(project.property("Students_tracking_keystore.jks"))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With