0

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.

1 Answer 1

1

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' 
Sign up to request clarification or add additional context in comments.

1 Comment

I was hoping to get rid of "compile", because it's obsolete. "Implementation" or "api" should be used instead, right?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.