1

I am trying to use the Apache commons-text 1.6 library in my Android Studio project. I have included it and it the commons-lang3 3.8.1 dependancy in my gradle file as shown below:

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'org.json:json:20180813'
    implementation 'org.apache.commons:commons-lang3:3.8.1'
    implementation 'org.apache.commons:commons-text:1.6'
}

But my import statements, eg: import org.apache.commons.text.translate.LookupTranslator; is not working - it is failing to recognise "text" in the import path as per the screen shot below.

Screen shot

philp
  • 21
  • 1
  • 5
  • 2
    It happens sometimes with android studio.. your dependencies have no issues...try clean build or rebuild the project it may work... – Amit Jangid Feb 05 '19 at 04:45
  • 1
    Thanks! The clean and rebuild didn't work but invalidate caches and restart did. Thanks for the direction. – philp Feb 05 '19 at 06:07

0 Answers0