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.
gradle
6,049
questions
1080
votes
36
answers
791k
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 ...
171
votes
15
answers
289k
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 ...
824
votes
22
answers
956k
views
How to add local .jar file dependency to build.gradle file?
I have tried to add my local .jar file dependency to my build.gradle file:
apply plugin: 'java'
sourceSets {
main {
java {
srcDir 'src/model'
}
}
}
dependencies {
...
838
votes
16
answers
890k
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 ...
1293
votes
12
answers
537k
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 ...
50
votes
5
answers
57k
views
React Native Android build failure with different errors without any changes in code for past days due to publish of React Native version 0.71.0-rc.0
Note: Error may be different but if you are getting any error when taking android build without any changes in code for past two days
My Error - Failed to install the app. Error: Command failed: ./...
533
votes
28
answers
533k
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 ...
557
votes
23
answers
842k
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 ...
136
votes
23
answers
137k
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 ':...
807
votes
24
answers
560k
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 (...
216
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/...
166
votes
14
answers
238k
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 ...
629
votes
20
answers
213k
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 ...
459
votes
18
answers
1.1m
views
How to update gradle in android studio?
I installed Android Studio 0.1.9. Today I got and update to version 0.2 and of course I updated. After the installation I restarted Android Studio but now I get this message:
Project is using an ...
223
votes
28
answers
302k
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 ...