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 + "]");
}
}
Error: Gradle DSL method not found: 'google()'
Method google()
was added in Gradle 4.0
You should use maven { url 'https://maven.google.com' }
on old versions
Also remove repositories
section from your app build.gradle
(you may merge it with root build.gradle
)
Read how to add library to build.gradle
here
compile('com.mikepenz:materialdrawer:5.9.5@aar') {
transitive = true
}
Gradle DSL method not found: 'ooapply()'
It looks like a problem in another build.gradle file.
The file you have attached is probably a Project-level build.gradle.
I guess that the problem is inside Module-level build.gradle file. Open this file and replace ooapply with apply.
Error: Gradle DSL method not found: compile()
Move this line in different lines:
//TV & Radio
compile "com.android.support:cardview-v7:$supportlib_version" compile "com.android.support:appcompat-v7:$supportlib_version" compile "com.android.support:recyclerview-v7:$supportlib_version" compile "com.android.support:design:$supportlib_version" compile "com.android.support:support-v4:$supportlib_version" compile "com.android.support:support-core-utils:$supportlib_version" compile "com.android.support:support-media-compat:$supportlib_version" compile "com.google.android.gms:play-services-gcm:$gps_version" compile "com.google.android.gms:play-services-ads:$gps_version" compile "com.google.android.gms:play-services-maps:$gps_version" compile 'com.google.maps.android:android-maps-utils:0.5+'
You can't use compile
in this way.
Use this:
compile "com.android.support:cardview-v7:$supportlib_version"
compile "com.android.support:appcompat-v7:$supportlib_version"
compile "com.android.support:recyclerview-v7:$supportlib_version"
compile "com.android.support:design:$supportlib_version"
compile "com.android.support:support-v4:$supportlib_version"
compile "com.android.support:support-core-utils:$supportlib_version"
compile "com.android.support:support-media-compat:$supportlib_version"
compile "com.google.android.gms:play-services-gcm:$gps_version"
compile "com.google.android.gms:play-services-ads:$gps_version"
compile "com.google.android.gms:play-services-maps:$gps_version"
compile 'com.google.maps.android:android-maps-utils:0.5+'
ERROR: Gradle DSL method not found: 'compile()'
Remove this line from the top-level file:
//compile 'io.github.ranga543:yelp-fusion-client:0.1.4'
In the app/build.gradle
file you can add the same dependency:
dependencies {
...
implementation 'io.github.ranga543:yelp-fusion-client:0.1.5'
...
}
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'
Gradle DSL method not found when updating application version
The versionCode
is an integer.
You can't use versionCode 5.1
in your build.gradle
Also you have to add this line at the beginning of your script.
apply plugin: 'com.android.application'
Related Topics
Display Badge on Top of Bottom Navigation Bar's Icon
Android Notification Is Not Showing
More Efficient Way of Updating UI from Service Than Intents
How to Check If a View Is Visible or Not in Android
How to Create Socket Connection in Android
Adt Requires 'Org.Eclipse.Wst.Sse.Core 0.0.0' But It Could Not Be Found
Use "Enter" Key on Softkeyboard Instead of Clicking Button
Android: Mediaplayer Setvolume Function
Onrequestpermissionsresult Not Being Called in Fragment If Defined in Both Fragment and Activity
Set Dynamic Base Url Using Retrofit 2.0 and Dagger 2
Error:(26, 0) Gradle Dsl Method Not Found: 'Runproguard()'
Sha1 Key for Debug & Release Android Studio MAC , How to Generate Sha1 Release Keys in MAC
Nullpointerexception When Trying to Access Views in a Kotlin Fragment
Show Download Progress Inside Activity Using Downloadmanager