Lazeeee
Lazeeee

Reputation: 1

Failed to resolve: org.apache.directory.studio:org.apache.commons.io:2.6

I have couple of years old Android App and I'm trying to get it working now. I have already solved many problems redarding to API levels and so on, but now I'm stuck. The app earlier used API 23, now using API 28.

When I'm trying to build the app in Android Studio this error occurs: Could not find org.apache.directory.studio:org.apache.commons-io:2.6.

I understand that for some reason it cannot be downloaded. I have tried to put many repositories in build.gradle file:

mavenCentral()
google()
maven { url "https://github.com/rosjava/rosjava_mvn_repo/raw/master" }
jcenter()
mavenLocal()
maven { url 'https://maven.fabric.io/public' }

But it always say Failed to resolve.

The corresponding row in build.gradle file:

api 'org.apache.directory.studio:org.apache.commons.io:2.6'

Also tried "implementation" instead of "api" but there's no difference.

What am I missing here? Compile SDK API 28, target SDK API 28.

Upvotes: 0

Views: 1387

Answers (1)

Son Truong
Son Truong

Reputation: 14173

From this link, you should change the line in gradle file from

api 'org.apache.directory.studio:org.apache.commons.io:2.6'

to

compile group: 'commons-io', name: 'commons-io', version: '2.6'

Update: New api keyword is exactly the same as the old compile keyword. To get rid of warning from compiler then use.

api group: 'commons-io', name: 'commons-io', version: '2.6'

Upvotes: 1

Related Questions