PrOgrAMmer PrOgrAMmer - 4 months ago 31
Android Question

error: cannot find symbol class StringJoiner in android

I am getting the below error when I use this gradle dependency:

compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.4'

is any way to fix this or it is incompatible with android. Is any others ways to use StringJoiner?

error: cannot find symbol class StringJoiner
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

The error created when I build the project.


Make sure that your target version is 24. StringJoiner was introduced starting API 24.

If you support <= API 24, consider using StringBuilder.

To know the difference, please refer here.