After downloading Android Studio 0.9.0 and after having it update the Gradle plugin to 0.14.0 I keep getting the following error whenever I try to build:
Error:Cannot get the value of write-only property 'runProguard'
Below is the buildTypes from my Build.gradle. I've tried deleting all of the proguard related lines and resyncing but nothing works. How can I get this error to go away?
buildTypes {
release {
debuggable false
signingConfig signingConfigs.release
//runProguard true
//proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
debug {
debuggable true
signingConfig signingConfigs.debug
//runProguard false
//proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
Open your gradle. properties file in Android Studio. Restart Android Studio for your changes to take effect. Click Sync Project with Gradle Files to sync your project.
Open your project in Android Studio and select File > Settings... > Build, Execution, Deployment > Build Tools > Gradle (Android Studio > Preferences... > Build, Execution, Deployment > Build Tools > Gradle on a Mac).
In some cases when your Gradle files are deleted or corrupted you will not be able to download new Gradle files in android studio. In this case, we have to delete the Gradle files which are present already and then again sync your project to download our Gradle files again.
all { Task task -> if (task.name == "preDebugBuild") { doFirst { //for debug build } } else if (task.name == "preReleaseBuild") { doFirst { //for release build } } } dependencies { ... } Be aware, the code that you put inside will not be executed when you change the build variant, but when you build app.
Apparently it was a problem with the Crashlytics/Fabric plugin. Update to version 1.14.3 in your dependencies classpath and it should work.
Source: https://plus.google.com/+AndroidDevelopers/posts/gvBK7fkYsR7
You don't need to update to Fabric if you don't want, just update your crashlytics version to 1.14.3:
buildscript {
repositories {
maven { url 'http://download.crashlytics.com/maven' }
}
dependencies {
classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.14.3'
}
}
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