I'm trying run the following code, however I cannot use encodeBase64().
I've already tried to import such libraries using Alt + Enter.

How can I make it work?
use this:
String result = Base64.encodeToString(data, Base64.DEFAULT);
instead of what you are using, i also advise you to use:
.getBytes("UTF-8"); instead of data.getBytes();
UTF-8 is always a better choice.
hope this will help you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With