Questions tagged [gradle]

Gradle is a project build automation tool that uses a Groovy DSL. Gradle build scripts support Maven and Ivy repositories as well as plain file system for dependency management.

Filter by
Sorted by
Tagged with
1065 votes
35 answers
767k views

Android Studio: Add jar as library?

I'm trying to use the new Android Studio but I can't seem to get it working correctly. I'm using the Gson library to serialize/deserialize JSON-objects. But the library somehow isn't included in the ...
user avatar
  • 11.5k
155 votes
14 answers
249k views

How to enable multidexing with the new Android Multidex support library

I want to use the new Multidex support library to break the method limit for one of my apps. With Android Lollipop Google introduced a multidex support library that makes it easy to multidex. What ...
user avatar
  • 182k
737 votes
20 answers
745k views

How to add local .jar file dependency to build.gradle file?

So I have tried to add my local .jar file dependency to my build.gradle file: apply plugin: 'java' sourceSets { main { java { srcDir 'src/model' } } } ...
user avatar
1225 votes
12 answers
446k views

What's the difference between implementation, api and compile in Gradle?

After updating to Android Studio 3.0 and creating a new project, I noticed that in build.gradle there is a new way to add new dependencies instead of compile there is implementation and instead of ...
user avatar
  • 70.4k
695 votes
14 answers
616k views

Using Gradle to find dependency tree

Is it possible to use Gradle to produce a tree of what depends on what? I have a project and would like to find out all the dependencies so I may be able to prune it a little with forward declarations ...
user avatar
  • 7,033
156 votes
13 answers
224k views

OpenCV in Android Studio

I want to use OpenCV library in my app with Android Studio. I followed instructions found here but I get error Configuration with name 'default' not found What can be wrong? I use Android Studio ...
user avatar
214 votes
26 answers
173k views

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 Landroid/support/v4/...
user avatar
  • 3,947
135 votes
23 answers
135k views

Java finished with non-zero exit value 2 - Android Gradle

I'm getting this error executing my Android app (I cleaned it and then built it, but the error is still present) Sync: OK Make Project: OK Clean: OK Run: Error Error:Execution failed for task ':...
user avatar
  • 1,897
485 votes
25 answers
429k views

How to manually include external aar package using Gradle for Android

I've been experimenting with the new android build system and I've run into a small issue. I've compiled my own aar package of ActionBarSherlock which I've called 'actionbarsherlock.aar'. What I'm ...
user avatar
  • 19k
799 votes
24 answers
558k views

Error retrieving parent for item: No resource found that matches the given name after upgrading to AppCompat v23

I've always programmed Android with Eclipse and decided to start migrating to Android Studio. I decided to use the same SDK I already had for Eclipse, then: Started a new project Set minimum SDK 4.0 (...
user avatar
611 votes
20 answers
195k views

Can the Android layout folder contain subfolders?

Right now, I'm storing every XML layout file inside the 'res/layout' folder, so it is feasible and simple to manage small projects, but when there is a case of large and heavy projects, then there ...
user avatar
429 votes
21 answers
527k views

How do I tell Gradle to use specific JDK version?

I can't figure out to get this working. Scenario: I have an application built with gradle The application uses JavaFX What I want Use a variable (defined per developer machine) which points to an ...
user avatar
  • 4,616
13 votes
4 answers
7k views

DexIndexOverflowException Only When Running Tests

I can successfully build and run my Android app in my debug and release variants with no problem. Yet, when I try to run my new unit tests (I never had them before), I get the dreaded ...
user avatar
  • 2,300
218 votes
28 answers
289k views

Android Studio suddenly cannot resolve symbols

Android Studio 0.4.2 was working fine and today I opened it and almost everything was red and the auto-completion had stopped working. I look at the imports and AS seems to be telling me it can't find ...
user avatar
382 votes
14 answers
382k views

appcompat-v7:21.0.0': No resource found that matches the given name: attr 'android:actionModeShareDrawable'

When attempting to use the latest appcompat-v7 support library in my project, I get the following error: /Users/greg/dev/mobile/android_project/app/build/intermediates/exploded-aar/com.android....
user avatar
  • 29.2k

15 30 50 per page
1
2 3 4 5
364