3

I'm trying to use Firebase token generator but I always get this error

        java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.encodeBase64URLSafeString

I use commons codec 1.10. I don't know whether is there a conflict or not. I'm just lost.

Please, help.

1 Answer 1

1

What version of Android are you using? Android already includes an older version of commons-codec:

Discussion about this problem

Also here: SO discussion

You are talking about:

encodeBase64URLSafeString

The method is since 1.4:

1.10 commons-codec Javadoc

In this Firebase token generator I can see:

  <dependency>
      <groupId>commons-codec</groupId>
      <artifactId>commons-codec</artifactId>
      <version>1.7</version>
    </dependency>

I guess you probably have an older version on the classpath then.

Sign up to request clarification or add additional context in comments.

1 Comment

no I use the newest version 1.10 and also I tried 1.7 ... it gives me same error

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.