Questions tagged [android-gradle-plugin]

The Android Gradle Plugin is Android's standard build system. It is used as backing-build-system by Android Studio.

This tag is for questions about the Android Gradle plugin. The Android Gradle plugin was introduced at Google IO in 2013 and replace the legacy ant-based build system.

Resources

12012 questions
267
votes
15 answers

Android Gradle Apache HttpClient does not exist?

I am trying to convert an IntelliJ project to the Gradle system of Android Studio but I am running into errors with Apache HttpClient? Am I missing something, the errors I am getting are as follows: Error:(10, 30) error: package…
Apqu
  • 4,520
  • 7
  • 37
  • 62
255
votes
18 answers

Android Studio Gradle Already disposed Module

I have installed Android Studio version 1.0.1. I have imported my projects from eclipse and it works fine. Then I deleted a module and reimported it into my Android Studio project. The gradle build says "BUILD SUCCESSFUL" but it pops up an alert…
Zenco
  • 2,893
  • 3
  • 14
  • 22
251
votes
28 answers

"Gradle Version 2.10 is required." Error

As I've been using classpath 'com.android.tools.build:gradle:+' In the build.gradle file, I got the following error since gradle version 2.10 has been released. The error is : Warning:Gradle version 2.10 is required. Current version is 2.8. If …
242
votes
15 answers

Error:Conflict with dependency 'com.google.code.findbugs:jsr305'

I created a new project in Android Studio 2.2 Preview 1 with Android App and Backend module with Google Messaging. This is the app file: apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.3" …
242
votes
19 answers

buildTypes cannot be applied to groovy.lang.Closure

I'm getting this warning in my project gradle file: Warning:(16, 5) 'buildTypes' cannot be applied to '(groovy.lang.Closure< com.android.build.gradle.internal.dsl.BuildType>)' My buildTypes section is: buildTypes { debug { …
Jim Vitek
  • 4,104
  • 3
  • 20
  • 31
241
votes
4 answers

Android buildscript repositories: jcenter VS mavencentral

The last time I used Android Studio, it generated .gradle files with mavencentral() buildscript repositories whereas now there's jcenter(). Could anyone explain the issues connected with this. Are there any other repos? When should we switch them?…
Jacob
  • 13,773
  • 18
  • 48
  • 69
235
votes
28 answers

Manifest merger failed : uses-sdk:minSdkVersion 14

Since downloading the latest SDK and installing Android Studio, my project fails to build. I get the following message: Error:Gradle: Execution failed for task ':SampleProject:processProdDebugManifest'. > Manifest merger failed :…
loeschg
  • 28,353
  • 25
  • 89
  • 143
234
votes
35 answers

Android Material and appcompat Manifest merger failed

I have next grade dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:28.0.0-rc01' implementation 'com.android.support.constraint:constraint-layout:1.1.2' …
234
votes
29 answers

How to set gradle home while importing existing project in Android studio

How to set gradle home while importing existing project in Android studio. While trying to import I need to set up this path.
deniz
  • 11,759
  • 10
  • 42
  • 61
224
votes
47 answers

Error: No toolchains found in the NDK toolchains folder for ABI with prefix: llvm

I want to compile an open source android project (Netguard) using gradel (gradlew clean build) But I encountered this Error: A problem occurred configuring project ':app'. > Exception thrown while executing model rule:…
Saeed
  • 6,520
  • 12
  • 37
  • 61
215
votes
26 answers

No resource found that matches the given name: attr 'android:keyboardNavigationCluster'. when updating to Support Library 26.0.0

I've got this issue while updating to the latest Support Library version 26.0.0 (https://developer.android.com/topic/libraries/support-library/revisions.html#26-0-0): Error:(18, 21) No resource found that matches the given name: attr …
214
votes
26 answers

Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat

If I run gradle assembleDebug from the command line, I am suddenly getting this error: UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dx.util.DexException: Multiple dex files define…
xrd
  • 3,841
  • 5
  • 24
  • 32
210
votes
20 answers

Could not find or load main class org.gradle.wrapper.GradleWrapperMain

I cleaned the whole project by deleting local directories like ~/.gradle, ~/.m2 ~./android and ~/workspace/project/.gradle and chosing File -> Invalidate Caches / Restart... in Android Studio. Now execution of the command ./gradlew leads to the…
SePröbläm
  • 4,337
  • 4
  • 21
  • 29
207
votes
3 answers

How to use ThreeTenABP in Android Project

I'm asking this question because I'm new to Java and Android and I searched for hours trying to figure this out. The answer came from a combination of related answers, so I figured I would document what I learned for anyone else who may be…
kael
  • 6,095
  • 5
  • 17
  • 24
204
votes
24 answers

Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK - Android

I know there are lots of questions similiar to this one, but i couldn't find a solution for my problem in any of those. Besides, I'll provide details for my specific case. I coded an Ionic project in Ubuntu 16.04 LTS, and now I have to build it for…
rbenvenuto
  • 2,345
  • 2
  • 10
  • 19