The Android Gradle plugin is Android's new build system, intended to replace Ant as the standard Android build tool.

learn more… | top users | synonyms

0
votes
0answers
5 views

Remove code lines on release version using gradle in Android studio

I have build a SDK JAR project with a Logger class which notify about system logs. for example: Logger.log("error on line 123 please check", Logger.SDK_DEBUG); At the moment there are few log ...
1
vote
0answers
16 views

How Do I Stop Gradle for Android From Building *All* Library Module Build Types On Every Build?

I'm sure that this has been asked before, but I'm just not finding the right keywords to ferret out answers, so... How do I stop Gradle for Android (inside or outside of Android Studio) from building ...
0
votes
0answers
13 views

Android build.gradle template

I make a build.gradle to increment prod version code on release build and some other config that I want for all my futur projects, is there a way to tell Android Studio (or intelliJ) to use my ...
0
votes
0answers
9 views

Publish gradle artifact whitout source

I'm working on an Android library for my company. The repo is private but we wanto ther developer can access the library to use in their app. As far as I read, when publishing an @aar, the source ...
0
votes
0answers
17 views

Gradle Build fails after adding Parse SDK for Android

I add the Parse SDK to my Android app in Android Studio. But now gradle build fails with the following message: Error:Execution failed for task ':app:dexDebug'. ...
0
votes
1answer
17 views

Importing jar into androidstudio project

Currently i'm getting this error: UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000) at ...
0
votes
0answers
11 views

Sharing resources across unit tests and instrumentation tests in Android

Now that Google has added experimental unit test support, how might one go about sharing resources across both unit tests and instrumentation test? For example, say I have a TestUtils.java class that ...
0
votes
0answers
15 views

Why must I Run my Android App to generate an APK file

I am using Android Studio 1.1.0 to build an APK for internal distribution in my company using AirWatch. My understanding of how to build an APK is to go to the "Build==>Make Project". However, when ...
0
votes
1answer
12 views

How to apply Cobertura plugin to all projects or all subprojects

I'm trying to apply the Cobertura plugin to all projects and subprojects in my Gradle build scripts. However, the scripts are unable to find the plugin when applied to all. Here is what I've got: ...
1
vote
3answers
23 views

Gradle - ProGuard - DuplicateClasses - NineOldAndroids

I use some libraries/modules for my project. On two of the libraries there are "nineoldandroids" used in the gradle with "-compile 'com.nineoldandroids:library:2.4.0'" on every library/module ! If I ...
0
votes
0answers
17 views

Gradle Exception while running lint

I'm getting an exception every time I run the Gradle task lint. The project has four build types and two flavors. The Gradle Version is 2.2.1 and the Android plugin version 1.1.3. Any help would be ...
0
votes
0answers
10 views

Dependencies not added to POM file - Android Gradle Maven Publishing

I'm using the maven-publish plugin to publish an aar file to a maven repository. However I noticed that compile dependencies are not added to the pom.xml even after I add the transitive property. I'm ...
0
votes
0answers
6 views

Gradle: Manipulating flavors version name and version code based on their buildTypes

I am searching from other questions related on BuildConfig. I can't find any appropriate answers for my problem. I want to generate apks with different version names and code, based on their ...
0
votes
1answer
14 views

Android Wear Version number in 4 places

Every time I upgrade my Android Wear App version number I have to change 2 lines in 4 files to the exact same value For clarity I am refering to versionCode and versionName in ...
0
votes
3answers
16 views

Jenkins build failed due to missing android SDK

As the title says my jenkins build fails due to not finding the android sdk dispite it being located in the environments path. Here is the console logs Started by user anonymous Building in ...
0
votes
1answer
11 views

How to sync two folders with Gradle?

I need keep folder inside synced with a folder called outside. The inside folder needs to be an exact copy of the outside folder - all subdirectories, files, etc. The Copy task works great, except ...
0
votes
0answers
23 views

How to tell when gradle wrapper is on/off in Android Studio?

I have twice now seen the message: Failed to apply plugin [id 'com.android.application'] Gradle version 2.1 is required. Current version is 2.2.1. If using the gradlewrapper, try editing the ...
0
votes
0answers
11 views

failed generation of apk file in idea intellij usign artifacts

I am using IDEA IntelliJ for android development and wanting to retrieve the apk but not getting it. I followed this site: ...
0
votes
1answer
25 views

Android Studio: A mess of Gradle build versions and compilation errors

When I import projects from github into Android studio I see various errors related to the gradle version. For all the miseries of Eclipse I dont ever remember needing to do an upgrade every time to ...
0
votes
1answer
29 views

Error with Android Gradle dependency version without '+'

I was developing an Android app and got an interesting error. I'm using the Support Library v7 RecyclerView, and the provided link says that the latest version is 21.0.0. I had this code: // in ...
0
votes
0answers
16 views

Using gradle to build apks with different resources without flavours

I have an application that should be branded (colors, graphic assets) according to requirements of different customers. Until now, I used flavours for doing this. Currently, my project contains a ...
0
votes
0answers
20 views

JReddit (Reddit Java wrapper) not working on Android Studio

I have been trying to make this work for a few days. I am trying to develop a Reddit client for Android using the JReddit Java wrapper. I have been playing with the API on Netbeans to get a good ...
0
votes
1answer
43 views

Local path doesn't exist android studio 1.1.0

I've being working on this project for over a week. Everything seems to work perfectly. But for the past three days, I don't know exactly what went wrong. This is my gradle console. Executing tasks: ...
0
votes
1answer
19 views

Why does the generated Cloud Endpoints library change its version now and then?

An App Engine project in Android Studio is (by default) configured to generate a client library, which can be consumed by an Android and/or iOS app. Gradle is configured to auto-generate the library: ...
0
votes
1answer
22 views

How should I configure my build.gradle file to work with API Level 17?

I've developed an application that have these on it's build.gradle file: android { compileSdkVersion 21 buildToolsVersion '21.1.2' defaultConfig { applicationId ...
0
votes
2answers
67 views

Android Studio 1.1 Gradle 2.2.1 Gradle version 2.1 required current version is 2.2.1

I am just trying to compile the latest version of u2020-daggr2 in Android stu![e I imported it as a gradle project. But I get error complaining about gradle! I did edit the ...
2
votes
1answer
58 views

How to use findViewById() in robolectric

I simply want to test with robolectric if a certain view is visible in a fragment. My unit test looks like this: ActivityController controller = Robolectric.buildActivity(FragmentActivity.class); ...
0
votes
3answers
52 views

import error from eclipse to android studio

I've exported my project as Gradle in Eclipse, but when I import it in Android Studio it throws the following error: Error:Gradle version 1.10 is required. Current version is 2.2.1. If using the ...
0
votes
1answer
25 views

How to create a project in Android Studio without the support library?

I'm sorry if this is a stupid question but I'm new to Android development and for my first app, I don't have any plans to support devices running API 17 and lower so I wish to not use the support ...
0
votes
0answers
12 views

Creating a new project in Android Studio Cradle Error?

I've tried all the suggested solutions from a previous question here: Android Studio stuck on gradle resolving dependencies The eventual solution that worked in that case was a reboot which did not ...
0
votes
0answers
30 views

Common java code for different android flavors

There are 5 flavors of Android app. class Sample.java that is the same for 4 but different for 1. I believe I cannot put the same class both in the main folder and in the flavor folder. So now I ...
1
vote
3answers
174 views

Android unit test support does not work in android library modules

I am writing junit tests on android project using the new unit test support http://tools.android.com/tech-docs/unit-testing-support. While the unit tests run on the 'com.android.application' ...
0
votes
0answers
15 views

ERROR: input directory 'Files' does not exist by creating signed apk with gradle

I have a current android project which consists of a normal android app and a library, which is used by the app. The app has different product flavours. When I try to build the projects with gradle ...
1
vote
1answer
29 views

How to use Gradle to generate JavaDoc in Android Studio?

I can not find any documentation on how to configure my Gradle file to create the JavaDoc for my project. I already tried some snippets from SO and blog articles but none of them seem to work or they ...
0
votes
1answer
21 views

NoClassDefFoundError: javax.xml.bind.DatatypeConverter

I am using Amazon's Java SDK in my Android app to communicate with SimpleDB. I added the sdk to the gradle file, and it runs until calls DatatypeConverter.printBase64Binary and I get the following ...
1
vote
1answer
73 views

Execution failed for task ':tweetLanes:dexDebug'

I am using Android Studio to run this code, get the error: *Error:Execution failed for task ':tweetLanes:dexDebug'. com.android.ide.common.process.ProcessException: ...
0
votes
2answers
17 views

Proguard slowing down android build process too much

My Android app build process takes 3+ minutes with ProGuard enabled. What are some basic things I can do to speed this up?
0
votes
0answers
11 views

Android Gradle Dependency

I am using local aar files for one of our projects and have below Query. I have 2 libraries and 1 application. 2 libraries are: 1. TestLib2 2. TestLib1 1 Application is: 1. Test I use a aar file ...
0
votes
1answer
15 views

Failed to build. Execution failed for task ':app:dexDebug'.

I have only one lib for my project, but I failed to build it. lib from https://github.com/dinocore1/DevsmartLib-Android/tree/master/devsmartlib. Any help will be greatly appreciated. Please tell ...
2
votes
0answers
61 views

Resource entry com.crashlytics.android.build_id is already defined

My project was working and everything was fine but have no idea what happened suddenly that I'm getting error when I want to build my project. This is Gradle output: ...
3
votes
1answer
127 views

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 ...
0
votes
1answer
20 views

Android Studio: Nested Library dependency

I have a project like this: Project | --Lib1 | --Lib2 | --Lib1 --Lib3 | --Lib1 Lib1 is a common dependency for Project, Lib2, and Lib3. How should I configure the build.gradle files?
0
votes
1answer
34 views

android gradle not running unit test

Hi i am trying to use and run unit tests on my android app using the Robolectric Test framework. However. when i run the command ./gradlew test it does not seem to run my unit tests at all. here is ...
0
votes
1answer
216 views

Gradle in Android Studio: Failed to resolve third-party libraries

I have been trying to switch my project from Intellij to Android Studio, which has required me to create a build.gradle file. I know I can add each of these as a library dependency, but I ideally want ...
1
vote
1answer
251 views

Gradle build failed when import support-v4-22.0.0

I'm working with local notification in phonegap & i added a jar file: com.android.support:support-v4:22.0.0 But when i run 'app', gradle shows failed error: Information:Gradle tasks ...
0
votes
0answers
38 views

How can I use both Realm.io and Dagger (or any multiple dependencies that need annotation processing)?

I'm trying to use both Realm.io and Dagger in my android app, but I seem to be getting conflict issues with the META-INF/services/javax.annotation.processing.Processor file. I've tried adding the ...
0
votes
0answers
47 views

Execution failed for task ':mobile:compileDebugNdk'

Hello I am getting the Error Execution failed for task ':mobile:compileDebugNdk'. > A problem occurred starting process 'command 'C:\Users\XXX\AppData\Local\Android\ndk\ndk-build.cmd'' while running ...
0
votes
0answers
39 views

Error:Execution failed for task ':app:dexDebug' Error Code: 1 com.android.dx.cf.iface.ParseException

Error:Execution failed for task ':app:dexDebug'. > com.android.ide.common.internal.LoggedErrorException: Failed to run command: /Users/blade/Documents/androiddev/sdk/build-tools/21.1.1/dx ...
0
votes
1answer
23 views

Gradle DSL method not found: storeFile()

I'm using Android Studio 1.1.0. When I try to sync my Gradle file, I get the following error: Gradle DSL method not found:storeFile() Here is my gradle configuration: apply plugin: ...
0
votes
1answer
27 views

Why do we set Gradle classpath reference in both project's and module's build.gradle?

When we create an empty Android Gradle project using Android Studio 1.1.0 (and all older versions of Android Studio), there are two references to the Gradle plugin. One reference is in the Project's ...