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

Gradle connectedAndroidTest fails with "No tests found." but outputs test results

Recently we started to add tests to our Android app project. We started of using Robolectric but have recently had to pull that out and just use the plain tests instead due to an issue we encountered with Couchbase. Before adding Couchbase our tests…
Cassie
  • 5,223
  • 3
  • 22
  • 34
9
votes
2 answers

Android manifest merger silently adds permissions

My Gradle project contains 4 libraries. In recent builds of my app I found that Android Studio is silently adding "read call log" and "write call log" permissions to the manifest. In the build folder is a "final" manifest that is packaged into the…
Grishka
  • 2,465
  • 1
  • 20
  • 38
9
votes
2 answers

On Android best place to keep settings like api url

In my android app, I need to keep the settings for the api url, that varies based on the type of build (I will have one for debug/staging and release). Keeping this into the strings file does not feel right since this folder has localized strings…
Calin
  • 6,661
  • 7
  • 49
  • 80
9
votes
1 answer

Android Studio Gradle new "apply plugin"

All of the tutorials I've read for Gradle explain that the build.gradle file should contain either: apply plugin: 'android' or apply plugin: 'android-library' However, I've just built a new project with Android Studio 0.8.6 and my build.gradle…
bcorso
  • 45,608
  • 10
  • 63
  • 75
9
votes
1 answer

Using gradle to test android apps in an emulator

Ok I want to use gradle to run my tests in an emulator. gradle has two targets that allow me to run tests: connectedCheck deviceCheck If I understood correctly, we should use deviceCheck to test stuff in an emulator, but when I run it runs no…
Rafael
  • 2,373
  • 4
  • 22
  • 28
9
votes
2 answers

Pass adb options/parameters to android gradle tasks (install, connectedCheck, etc)

In the Android gradle plugin there are options for aapt and dex but I can't find where I can pass parameters to the adb used by tasks such as install and connectedCheck (and any other that would use adb to complete). My problem is that I want to…
Olinasc
  • 1,261
  • 1
  • 12
  • 20
9
votes
2 answers

Symbols are stripped when building native code using Gradle

In my Android project, using the latest Gradle build tools, I have a single file with native C code and a few simple function. The only thing included in the C file is string.h and jni.h and the functions simply return String and primitives. The…
9
votes
2 answers

Blocked with Android studio compilation issue ManifestMerger2$MergeFailureException

With Android studio v0.8.2, I am blocked with the following exception. With the beta release it was working very well. I have updated my IDE to 0.8.2 and deleted my target directory and trying to build again. I am struck now. Execution failed for…
9
votes
2 answers

How to fix "Content is not allowed in prolog" build error?

When I upgraded to Android Studio 0.6.1, I encountered a build issue with asset files. I kept getting "Content is not allowed in prolog" during the mergeDebugResources task. Since I couldn't find a suitable answer to this and have since found a…
oracleicom
  • 918
  • 4
  • 11
  • 19
9
votes
1 answer

How to Exclude Duplicate C Shared Libraries (.so) in a Multi-Project Android Build?

I get a "duplicate files" conflict when building a parent project with two library modules, which make use of the same libc++_shared.so shared library. (NOTE: Please do not consider this a "duplicate question". I have read several related posts,…
Jack Straw
  • 490
  • 1
  • 7
  • 17
9
votes
4 answers

Android unit tests can't find Mockito package

I am using Android Studio with Gradle, and I am trying to use Mockito in my unit tests. The problem is that I receive the following errors when I run the tests: Error:Execution failed for task ':app:compileDebugJava'. Compilation failed; see the…
twiz
  • 9,041
  • 8
  • 52
  • 84
9
votes
3 answers

How do I set my Android app package name based on two different flavor dimensions?

I'm building my Android app with the Gradle plugin. I'm using the flavors feature to create four different variants. At the moment, it's a single dimension with four values, but it would be more logical to set it up as two dimensions with two…
Argyle
  • 3,324
  • 25
  • 44
9
votes
5 answers

gradle sync failed on intellij idea 13.1.1

I'm creating an Android project with Gradle Android Module, but as soon as I create it, I have an error I don't understand and I have no idea to resolve it. It says Gradle project sync failed. Basic functionality (e.g editing, debugging) will not…
user3441190
  • 111
  • 1
  • 1
  • 3
9
votes
3 answers

9 patch image prevent build project android studio

I am moving to Gradle build . but i have this error for a lot of 9-patch images . Note the drawable is auto generated by http://android-holo-colors.com but they are old. I am using android studio 0.5.1 and my build tool version is 19.0.3 this is…
user4o01
  • 2,688
  • 4
  • 39
  • 54
9
votes
3 answers

Gradle Sync wont finish after 0.4.6 upgrade

After I upgraded my Android Studio to 0.4.6, it seems to get stuck with Gradle Sync. The yellow ribbon is persistently present on the top that says "Gradle Project Synch in Progress". However, there is no indication of any process running from the…
user3259937
  • 567
  • 7
  • 16
1 2 3
99
100