Top "Build.gradle" questions

The file build.

Why are there two build.gradle files in an Android Studio project?

After having imported an Eclipse project into Android Studio, I see two build.gradle files: 1 - <PROJECT_ROOT>\…

android android-studio gradle android-gradle-plugin build.gradle
Difference between build.gradle(Project) and build.gradle(Module)

I am trying to add a dependency of Android Asynchronous Http Client into my project. So there are two build.…

android android-studio build.gradle
How to get current flavor in gradle

I have two product flavors for my app: productFlavors { europe { buildConfigField("Boolean", "BEACON_ENABLED", "false") } usa { buildConfigField("Boolean", "BEACON_ENABLED", "…

android gradle android-gradle-plugin build.gradle
Android Studio: Resolving Duplicate Classes

When I try to run my android application on an Android device, the gradle console reports the following error: Error:…

android gradle android-gradle-plugin build.gradle loopj
IntelliJ IDEA and Gradle - Cannot be applied to '(groovy.lang.Closure)'

I have a Gradle file which, whenever I load open it in IntelliJ IDEA 14.1.5, shows IDE errors for the entire …

java intellij-idea groovy gradle build.gradle
gradle execute task after build

I am building my project with gradle, with the following build.gradle file: project('a'){ apply plugin: 'java' apply plugin: …

gradle build.gradle
Gradle task to create a zip archive of a directory

I have a gradle task to create a zip archive of a directory. The gradle task is: task archiveReports(type: …

gradle zip build.gradle archive
Android Studio 3.0 Beta 1: Failed to resolve: com.android.support:multidex:1.0.2

After migrating from Android Studio 3.0 (Canary 5) to Android Studio 3.0 (Beta 1), and moving to latest gradle , i.e. 'com.android.tools.…

android gradle android-gradle-plugin build.gradle android-multidex
Error:(1, 0) Gradle DSL method not found: 'android()'

What should i do to fix this issue? I am getting this error when i ever i run my project …

build.gradle
What's the difference between "minifyEnabled" and "useProguard" in the Android Plugin for Gradle?

I see that the Android Plugin for Gradle has a minifyEnabled property as well as a useProguard property, as follows: …

android gradle android-gradle-plugin build.gradle android-proguard