After Android Studio update: Gradle DSL method not found: 'runProguard()'
runProguard
has been renamed minifyEnabled
. See the changelog here for confirmation - version 0.14.0 (2014/10/31) of the Android Gradle plugin made the swap.
ERROR: Gradle DSL method not found: 'implementiation()' Possible causes:
It's a typo in your build.gradle
. You have used implementiation instead of implementation.
Change this like below:
implementation 'com.google.firebase:firebase-perf:19.0.4'
instead of
implementiation 'com.google.firebase:firebase-perf:19.0.4'
Error:(26, 0) Gradle DSL method not found: 'runProguard()'
As far as I know runProguard
was replaced with minifyEnabled
. I am still not sure how to define the config for proguard but a Google search should help you to find out.
Edit:
For the outFile
read here: https://groups.google.com/forum/#!topic/adt-dev/4_-5NvxuFB0 how they do it.
In short: they used a more complex version:
applicationVariants.all { variant ->
variant.outputs.each { output ->
def apk = output.outputFile;
def newName;
// newName = apk.name.replace(".apk", "-v" + defaultConfig.versionName + "-" + variant.buildType.name.toUpperCase() + ".apk");
if (variant.buildType.name == "release") {
newName = apk.name.replace(".apk", "-v" + defaultConfig.versionName + "-release.apk");
} else {
newName = apk.name.replace(".apk", "-v" + defaultConfig.versionName + "-beta.apk");
}
output.outputFile = new File(apk.parentFile, newName);
if (output.zipAlign) {
output.outputFile = new File(apk.parentFile, newName.replace("-unaligned", ""));
}
logger.info('INFO: Set outputFile to ' + output.outputFile + " for [" + output.name + "]");
}
}
Related Topics
Add "View More" at the End of Textview After 3 Lines
How to Find MAC Address of an Android Device Programmatically
How to Transfer an Image from Its Url to the Sd Card
Which Correct Flag of Autoconnect in Connectgatt of Ble
How to Manipulate the Camera Preview
How to Detect Orientation of Android Device
Android Countdowntimer - Additional Milliseconds Delay Between Ticks
Problem to Load Flv Video in Webview
How to Make Circle Custom Progress Bar in Android
What Is the Benefit of Viewholder Pattern in Android
Change the Text Color of Numberpicker
Android:Call Activity of Another Application
Current Month Facebook Friends Birthdays in Android
Force Update of an Android App When a New Version Is Available