Skip to main content
The 2024 Developer Survey results are live! See the results

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
1455 votes
24 answers
476k views

What is Gradle in Android Studio?

Gradle is a bit confusing to me, and also for any new Android developer. Can anyone explain what Gradle in Android Studio is and what its purpose is? Why is it included in Android Studio?
androidcodehunter's user avatar
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 ...
humazed's user avatar
  • 76.2k
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 ...
Ozzie's user avatar
  • 11.7k
1023 votes
26 answers
1.1m views

How can I force Gradle to redownload dependencies?

How can I tell Gradle to redownload dependencies from repositories?
fedor.belov's user avatar
911 votes
47 answers
750k views

Android Studio Error "Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8"

I downloaded the newest Android Studio, and I wanted to run the Android Jetpack Compose Project, but when I ran it, I got the error: > Failed to apply plugin 'com.android.internal.application'. >...
Ven Shine's user avatar
  • 9,226
862 votes
12 answers
632k views

Gradle build without tests

I want to execute gradle build without executing the unit tests. I tried: gradle -Dskip.tests build That doesn't seem to do anything. Is there some other command I could use?
Dave's user avatar
  • 14k
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 ...
user3286701's user avatar
  • 8,463
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 { ...
letter Q's user avatar
  • 15.1k
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 (...
Vini.g.fer's user avatar
  • 11.8k
679 votes
18 answers
1.3m views

How to clear gradle cache?

I'm trying to use Android Studio, and the first time I boot it up, it takes like 45 MINUTES to compile... If I don't quit the application, it is okay - each subsequent compilation/running the app will ...
David T.'s user avatar
  • 23.1k
676 votes
12 answers
572k views

How to run only one unit test class using Gradle?

I am new to Gradle. I use Gradle 1.10 and Ubuntu 13. I want to know if there's any command to execute only one unit test class, similar to testOnly in SBT.
bula's user avatar
  • 9,109
659 votes
35 answers
775k views

No matching client found for package name (Google Analytics) - multiple productFlavors & buildTypes

Context: I'm trying to set up Google Analytics for my app. (having 4 custom buildTypes and more than a few productFlavors) It works fine when I select the Build Variant which has the applicationId ...
Viral Patel's user avatar
  • 33.1k
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 ...
Paresh Mayani's user avatar
627 votes
38 answers
539k views

More than one file was found with OS independent path 'META-INF/LICENSE'

When I build my app, I get the following error: Error: Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'. More than one file was found with OS independent path 'META-INF/...
Cyrus's user avatar
  • 9,375
624 votes
15 answers
853k views

You have not accepted the license agreements of the following SDK components [duplicate]

I downloaded the latest Android SDK tools version 24.4.1. I used the command line to install SDKs. I typed y when asked Do you accept the license 'android-sdk-license-c81a61d9' [y/n]: y after ...
codable's user avatar
  • 6,519

15 30 50 per page
1
2 3 4 5
3502