to manage the versions of all compile and runtime dependencies of a project, including resolution rules for transitive dependencies with conflicting versions.
Questions tagged [gradle-dependencies]
171 questions
5
votes
2 answers
Using RxJava 2 and Retrofit 2, adapter version issue
I've added a new library module to existing application module in Android Studio. The main difference was adding RxJava 2 and Retrofit 2.
After updating build.gradle of new module I started to get next error:
Error:Execution failed for task…
![](../../users/profiles/3675659.webp)
Gaket
- 5,580
- 2
- 30
- 59
4
votes
0 answers
Why do I get error after changing "compile" to "implementation" in gradle.build?
This is my gradle.build file in one of the modules in the project now:
apply plugin: 'com.android.library'
android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
defaultConfig {
minSdkVersion 16
targetSdkVersion 25
…
![](../../users/profiles/1406192.webp)
PIXP
- 1,802
- 3
- 16
- 25
4
votes
1 answer
Javadoc generation "error package does not exist" in multi module project
I need to upload my libraries(multi-module project) into sonatype repository through Bintray. So that I need to generate the Javadoc individually for each module.
First I faced the problems in these similar questions
Android Studio Javadoc: Cannot…
![](../../users/profiles/5134215.webp)
Vignesh Sundaramoorthy
- 1,626
- 22
- 33
4
votes
1 answer
How can I make Gradle download optional dependencies automatically?
When downloading dependencies using Gradle it seems to exclude optional dependencies. For example, I included Guava:
compile 'com.google.guava:guava:19.0'
and it did not download the optional dependencies listed here:…
![](../../users/profiles/304151.webp)
Mridang Agarwalla
- 38,521
- 65
- 199
- 353
4
votes
0 answers
Android Studio - Create JAR file with dependencies for standard Java project
I'm building a standard java project, not an android project.
It is using the Gson library from Google.
Is there a way to create a JAR file for this project, while maintaining dependencies to the Gson library? Please correct me if I'm framing the…
![](../../users/profiles/4594387.webp)
fractal5
- 1,767
- 1
- 20
- 42
3
votes
3 answers
Gradle module output configuration for test dependencies only
I have a Gradle project containing the two modules app and test, where test contains utilities for testing only. Now I'd like to setup this module, so it doesn't include any outputs into the main configuration of app; even not…
![](../../users/profiles/3385212.webp)
tynn
- 33,607
- 8
- 80
- 121
3
votes
1 answer
Gradle is not downloading .aar dependency properly (no files just manifest.mf)
When I was not able to resolve some of the classes located in external dependency I debugged and found that gradle is some how not downloading jars properly. I have checked on my peer computer that this play-services-tasks-15.0.1.aar is around 127…
![](../../users/profiles/4557882.webp)
Muhammad Muzammil
- 864
- 1
- 9
- 24
3
votes
2 answers
Problems with dependencies
I want to create cool preferences activity. So I choose one of majority libraries from github (suppose this: https://github.com/codevscolor/MaterialPreference)
But when I write dependency to my build.gradle I have warning about
"mixing libraries…
user7836085
3
votes
0 answers
Difference between 'api' and 'implementation' in android studio 3.0 gradle dependencies
Since android studio 3.0 when I build a project a new syntax implementation is by default added in gradle dependency section like below:
implementation 'com.android.support:appcompat-v7:26.1.0'
We can also use api instead of implementation here…
![](../../users/profiles/3806413.webp)
0xAliHn
- 16,415
- 20
- 78
- 97
3
votes
1 answer
Gradle dependency exclusion not working
My project build.gradle dependencies are:
dependencies {
...
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.google.android.gms:play-services-maps:8.4.0'
compile 'com.google.android.gms:play-services-analytics:8.4.0'
…
![](../../users/profiles/1423773.webp)
GuilhE
- 10,723
- 13
- 63
- 94
2
votes
0 answers
Can't resolve dependencies in test module shared with other modules with Gradle Kotlin DSL
I have a test-utils module which contains testImplementation, androidTestImplementation and some rules and file reading extension code such as
fun getResourceAsText(path: String): String {
return object…
![](../../users/profiles/5457853.webp)
Thracian
- 6,939
- 2
- 33
- 64
2
votes
0 answers
R8 warning "Missing class: javax.swing.JFrame", how to get ride of Swing?
Recently I noticed that when I compile my app in release mod, R8 log the following warning message: Missing class: javax.swing.JFrame along with others Swing/Java desktop classes like Missing class: java.awt.event.WindowAdapter or Missing class:…
![](../../users/profiles/10490027.webp)
Bencri
- 749
- 1
- 4
- 16
2
votes
1 answer
Execution failed for JetifyTransform with android.tools.lint
Project build.gradle:
buildscript {
ext.kotlin_version = '1.3.72'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.3'
classpath…
![](../../users/profiles/1423773.webp)
GuilhE
- 10,723
- 13
- 63
- 94
2
votes
1 answer
How to use custom task as artifact
I have a simple custom task in a project's (lets call it projectA) build script that creates a file. The task looks like this:
task createFile() {
def outputFile = rootProject.file("${buildDir}/tmp/outputFile.txt")
outputs.file(outputFile)
…
![](../../users/profiles/4323935.webp)
dpr
- 8,675
- 3
- 32
- 57
2
votes
1 answer
Create dependencies.gradle in android studio
How can I create dependencies.gradle in android studio like bellow:
And:
![](../../users/profiles/10211127.webp)
jo jo
- 1,186
- 2
- 7
- 24