user14536109
user14536109

Reputation:

In Android Studio how do you find which dependency to add?

This is a basic question I can't find an answer to. For example I want to use a class called CompositeCollection but I can't find what to add under Dependencies in app gradle in order to use it. It's probably org.apache.commons.something. Unlike other dependencies which get added automatically by Android Studio (like androidx.anything) ones like this don't so I have to add them manually.

Going to File > Project Structure > Dependencies > + doesn't help since nothing shows up in that search unless you already know the name of the dependency beforehand. Googling the CompositeCollection class didn't tell me the dependency either.

Upvotes: 1

Views: 416

Answers (1)

MehranB
MehranB

Reputation: 1525

try this for maven :

<dependency>
  <groupId>org.apache.commons</groupId>
  <artifactId>commons-collections4</artifactId>
  <version>4.4</version>
</dependency>

or this for gradle:

implementation 'org.apache.commons:commons-collections4:4.4'

Upvotes: 2

Related Questions