Foggy day

Android(Java) - base64 encode/decode about sdk version 본문

Android

Android(Java) - base64 encode/decode about sdk version

jinhan38 2021. 1. 21. 08:40

 

we often use base64 encode/decode.

 

when i used base64, i just added base64 in import using alt + enter. 

 

import java.util.Base64;

 

But if you add Base64 of java, codes using it need oreo version.

 

The solution i found is android.Base64. In fact, there is no solution.

 

Add Adroid.Base64 instead of java.Base64

 

import android.util.Base64;