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

12908 questions
9
votes
2 answers

Please explain the Android build.gradle groovy syntax

What does the following groovy syntax really mean? The Gradle docs tout how the build.gradle is just groovy. The Android team has simplified the default build.gradle to the point that it doesn't look like code (to me at least). Please explain what…
David
  • 2,429
  • 24
  • 15
9
votes
1 answer

How to create reusable activities in Android?

I've been working on a mobile app for a couple of months. Now I want to develop other apps but reusing the code I've written. I'd like to have reusable code (activities) in order to be used in many projects. In this way, if there is some bug in one…
9
votes
1 answer

Error:Failed to find: com.google.guava:guava:18.0.+

I added this dependency to the gradle file // This is used by the Google HTTP client library. compile(group: 'com.google.guava', name: 'guava', version: '18.0.+') I tried syncing the Gradle file but it keeps giving me this error Error:Failed to…
Isaac
  • 296
  • 1
  • 4
  • 14
9
votes
1 answer

How to get acces to values from another gradle file?

Ok, here is my current build.gradle: apply plugin: 'com.android.application' apply from: '../config.gradle' android { compileSdkVersion 21 buildToolsVersion "21.1.2" defaultConfig { applicationId "" minSdkVersion 15 …
Rishka
  • 413
  • 5
  • 16
9
votes
3 answers

Gradle task to change a boolean in build config

I would like to create a very simple task which change a boolean in my gradle config. I work on an Android application which can be run with several profiles, and for each build a need to specify if in my code the app must fake the bluetooth or…
psv
  • 3,147
  • 5
  • 32
  • 67
9
votes
1 answer

Android Manifest vs Gradle Script

I set minSdkVersion to be 8 in Gradle build script and minSdkVersion to be 4 in Android module manifest. Which one is taken? Why aren't these 2 synchronized?
stuckedunderflow
  • 3,551
  • 8
  • 46
  • 63
9
votes
3 answers

How to include multiple Repositories in build.gradle?

Android Studio won't let me build this. It says com.mixpanel.blahblahblah is not found. com.mixpanel.blahblahblah comes from mavenCentral() I know the problem is because it doesn't recognize mavenCentral() because it only recognizes the other repo.…
bharv14
  • 493
  • 1
  • 6
  • 15
9
votes
4 answers

How to debug my app using adb(without IDE) android

I am using gradle script for building the app in Eclipse . By using gradle I can run the application to the device, by using the script in gradle. task run(type: Exec, dependsOn: 'installDebug') { def adb =…
Krish
  • 3,860
  • 1
  • 19
  • 32
9
votes
1 answer

Generating .so files in Android Studio 1.0.2 with NDK

I have been working on getting a very simple NDKSample application built as per the walk-through here. My problem is, I cannot get Android Studio to generate the .so files, so I have no libraries. I understand that NDK Support is deprecated now and…
9
votes
6 answers

gradle project sync failed. basic functionality(e.g editing, debugging) will not work properly in android studio 1.0.1

I have started using Android Studio 1.0.1 and there is nothing I can do as I have this error and even the XML can't be rendered. Error:Unable to start the daemon process. This problem might be caused by incorrect configuration of the daemon. For…
gautam joshi
  • 131
  • 1
  • 2
  • 11
9
votes
1 answer

Testing release and proguarded version of Android app - NoSuchMethodError

I'm trying to test release build of Android app with Proguard turned on. I've created additional Proguard rules file for test dependencies which is included in the release rules file. -keep class android.test.** { *; } -dontwarn android.test.** #…
tomrozb
  • 25,773
  • 31
  • 101
  • 122
9
votes
3 answers

How to import Android Studio (1.0) project into Intellij 14 Ultimate

I have an Android Studio project and I would like to start using Intellij 14 Ultimate to take advantage of some of the cool features it has to offer. When I try to open my project I get a message saying: Gradle Sync Version 1.0.0-rc4 of the Android…
9
votes
2 answers

Play Service granular dependency error

I try to use new Granular Dependency for Google Play Service 6.5.+ In my gradle I set: dependencies { compile 'com.android.support:appcompat-v7:21.0.2' compile 'com.google.maps.android:android-maps-utils:0.3' compile…
shaithana
  • 2,470
  • 1
  • 24
  • 37
9
votes
3 answers

Android Studio 1.0RC4 Gradle build error

I just downloaded Android Studio 1.0RC4 and I can't build any project, even newly created ones. The error I got is: Error:Could not run build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-2.2.1-all.zip'. I was…
Moondustt
  • 864
  • 1
  • 11
  • 30
9
votes
2 answers

Android MultiDex - Questions on Inner Workings

I recently discovered the new MultiDex functionality from Android for working with apps having more than 65,000 references. See: https://developer.android.com/tools/building/multidex.html Can someone help me understand the following questions: 1)…
1 2 3
99
100