maven error cannot find symbol method encodeBase64String
when I'm trying to do mvn install in eclipse, I'm getting below error:
ERROR] /C:/myproj/package/MyClass.java:[43,49] cannot find symbol symbol: method encodeBase64String(byte)
I even kepted below dependency, BUT still showing that error.
<dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> <version>20041127.091804</version> </dependency>
Please suggest me what could be wrong and what I've to do?
Just changed version to 1.4 and it got worked!
Did you do import on the class Base64 or import static? Your usage suggests you did the former. If that be the case, then you need to use Base64.encodeBase64String instead of just calling encodeBase64String