It should be: after decoding what __
Java used in the
Base64. GetDecoder (). The decode ()decoding, it is normal
Android is
import android. Util. Base64.
If you use the
import Java. Util. Base64.must be minimum SDK to 26, but I'm a compatible to the SDK 21...
So I use the
Base64. Decode (string, Base64. DEFAULT))
this methodBut the decoding out will be a lot more
Bosses, how to solve ah
I watched the Java. Util. The decode method Base64, actually use is
public byte [] decode (String SRC) {
Return the decode (SRC) getBytes (ISO_8859_1. INSTANCE));
}
So should be a coding problem? But Android inside even wrote code for ISO_8859_1 getBytes method, or so...
CodePudding user response:
Base64 classes in Java and Android SDK is different, it's best to copy a used in the project's source codeCodePudding user response: