Edited 07.12.2018:

I think dependency for StringUtils you are using is not proper.

Please add below dependency to gradle and Sync project and import your class.

implementation 'org.apache.commons:commons-lang3:3.6'

This on is using deprecated task (but should still works):

compile 'org.apache.commons:commons-lang3:3.5'

Edit:

As OoDeLally mentioned in a comment,

Above mentioned version is deprecated, Please use below dependency:

implementation 'org.apache.commons:commons-text:1.9'

Edit 2:

deprecated as for July 2019. Use stackoverflow.com/a/55567755/1541141 instead

Thanks @OoDeLally!

Answer from AndiGeeky on Stack Overflow
🌐
Maven Repository
mvnrepository.com › artifact › org.apache.commons › commons-lang3 › 3.0
Maven Repository: org.apache.commons » commons-lang3 » 3.0
July 19, 2011 - Apache Commons Lang, a package of Java utility classes for the classes that are in java.lang's hierarchy, or are considered to be so standard as to justify existence in java.lang. The code is tested using the latest revision of the JDK for supported LTS releases: 8, 11, 17, 21 and 25 currently.
Published   Jul 19, 2011
Version   3.0
🌐
OpenRewrite
docs.openrewrite.org › recipe catalog › apache › commons › commons lang › migrates to apache commons lang 3.x
Migrates to Apache Commons Lang 3.x | OpenRewrite Docs
plugins { id("org.openrewrite.rewrite") version("latest.release") } rewrite { activeRecipe("org.openrewrite.apache.commons.lang.UpgradeApacheCommonsLang_2_3") setExportDatatables(true) } repositories { mavenCentral() } dependencies { rewrite("org.openrewrite.recipe:rewrite-apache:2.23.0") } Run gradle rewriteRun to run the recipe.
Published   1 week ago
🌐
Apache Commons
commons.apache.org › proper › commons-lang › dependency-info.html
Maven Coordinates – Apache Commons Lang
Apache Commons, Apache Commons Lang, Apache, the Apache logo, and the Apache Commons project logos are trademarks of The Apache Software Foundation.
🌐
Gradle
docs.gradle.org › current › samples › sample_tasks_with_dependency_resolution_result_inputs.html
Implementing tasks with dependency resolution result inputs Sample
plugins { id("application") id("com.example.dependency-reports") } dependencies { constraints { implementation("org.apache.commons:commons-text:1.9") } implementation("org.apache.commons:commons-text") implementation(project(":utilities")) }
🌐
Maven Repository
mvnrepository.com › artifact › org.apache.commons
Maven Repository: org.apache.commons
Apache Commons Lang, a package of Java utility classes for the classes that are in java.lang's hierarchy, or are considered to be so standard as to justify existence in java.lang.
🌐
Maven Central Repository
search.maven.org › artifact › org.apache.commons › commons-lang3 › 3.10 › jar
org.apache.commons:commons-lang3:3.10
pkg:maven/org.apache.commons/commons-lang3@3.10 · Used in: components · Overview · Overview · Versions · Versions · Dependents · Dependents · Dependencies ·
🌐
Maven Central
central.sonatype.com › artifact › org.apache.commons › commons-lang3
org.apache.commons:commons-lang3 - Maven Central
--> <project xmlns="http://mav... <description> Apache Commons Lang, a package of Java utility classes for the classes that are in java.lang's hierarchy, or are considered to be so standard as to justify existence in java.lang....
Find elsewhere
🌐
Maven Repository
mvnrepository.com › artifact › org.apache.commons › commons-lang3
Maven Repository: org.apache.commons » commons-lang3
November 12, 2025 - Apache Commons Lang, a package of Java utility classes for the classes that are in java.lang's hierarchy, or are considered to be so standard as to justify existence in java.lang. The code is tested using the latest revision of the JDK for supported LTS releases: 8, 11, 17, 21 and 25 currently.
🌐
Linux Hint
linuxhint.com › gradle-repositories
Gradle Repositories
Linux Hint LLC, [email protected] 1210 Kelly Park Circle, Morgan Hill, CA 95037 Privacy Policy and Terms of Use
🌐
Apache Commons
commons.apache.org › lang
Home – Apache Commons Lang
Apache Commons, Apache Commons Lang, Apache, the Apache logo, and the Apache Commons project logos are trademarks of The Apache Software Foundation.
🌐
GitHub
github.com › enasequence › sequencetools › blob › master › build.gradle
sequencetools/build.gradle at master · enasequence/sequencetools
implementation 'commons-lang:commons-lang:2.6' implementation 'org.apache.commons:commons-lang3:3.0' implementation 'org.apache.commons:commons-compress:1.20' · implementation group: 'org.mapdb', name: 'mapdb', version: '3.0.10' · testImplementation 'org.json:json:20231013' testImplementation "junit:junit:4.13.1" testImplementation 'org.easymock:easymock:4.2' ·
Author   enasequence
🌐
Maven Repository
mvnrepository.com › artifact › org.apache.commons › commons-lang3 › 3.1
Maven Repository: org.apache.commons » commons-lang3 » 3.1
See https://github.com/apache/commons-lang/blob/master/.github/workflows/maven.yml Please ensure your build environment is up-to-date and kindly report any build issues. ... aar amazon android apache api arm assets build build-system bundle client clojure cloud config cran data database eclipse example extension framework github gradle ...
🌐
GitHub
github.com › apache › commons-lang
GitHub - apache/commons-lang: Apache Commons Lang · GitHub
The code is tested using the latest revision of the JDK for supported LTS releases: 8, 11, 17, 21 and 25 currently. See https://github.com/apache/commons-lang/blob/master/.github/workflows/maven.yml
Author   apache
🌐
GitHub
github.com › spotbugs › spotbugs › issues › 1135
apache-commons-lang3 dependency conflict · Issue #1135 · spotbugs/spotbugs
February 1, 2020 - With version 4.0.2 onwards, we would get a dependency conflict when using spotbugs in gradle. > Task :dependencyInsight Dependency resolution failed because of conflict(s) on the following module(s): - org.apache.commons:commons-lang3 between versions 3.10 and 3.9 org.apache.commons:commons-lang3:3.10 variant "runtime" [ org.gradle.status = release (not requested) org.gradle.usage = java-runtime (not requested) org.gradle.libraryelements = jar (not requested) org.gradle.category = library (not requested) ] Selection reasons: - By conflict resolution : between versions 3.10 and 3.9 org.apache.commons:commons-lang3:3.10 \--- com.github.spotbugs:spotbugs:4.0.4-SNAPSHOT:20200513.002836-2 \--- spotbugs org.apache.commons:commons-lang3:3.9 -> 3.10 \--- org.apache.commons:commons-text:1.8 \--- com.github.spotbugs:spotbugs:4.0.4-SNAPSHOT:20200513.002836-2 \--- spotbugs
Published   May 27, 2020
🌐
GitHub
github.com › centic9 › commons-dost › blob › master › build.gradle
commons-dost/build.gradle at master · centic9/commons-dost
implementation 'org.apache.commons:commons-lang3:3.19.0' implementation 'org.apache.commons:commons-text:1.14.0' implementation 'org.apache.httpcomponents:httpclient:4.5.14' implementation 'org.apache.httpcomponents.client5:httpclient5:5.5.1' implementation 'org.apache.httpcomponents:httpasyncclient:4.1.5' implementation 'org.apache.commons:commons-exec:1.5.0' implementation 'org.apache.logging.log4j:log4j-api:2.25.2' implementation 'net.java.dev.jna:jna:3.4.0' ·
Author   centic9
🌐
Maven Central
central.sonatype.com › artifact › org.apache.commons › commons-lang3 › 3.12.0
org.apache.commons:commons-lang3:3.12.0 - Maven Central
--> <project xmlns="http://mav... <description> Apache Commons Lang, a package of Java utility classes for the classes that are in java.lang's hierarchy, or are considered to be so standard as to justify existence in java.lang....