如何使用的Base64(包含在自API 8(2.2安卓))在Android项目API 3(安卓1.5)?如何使用、项目、API、Android

2023-09-06 09:18:39 作者:苩紙①張

我需要使用的Base64我的应用程序(进口android.util.Base64;),但Base64的被列入的Andr​​oid 2.2,API拉特8。然后,当我做进口我得到这个错误:的Base64不能被解决,不给我以导入的可能性,因为我做我的项目与API拉特3出于某些原因我的应用程序必须与旧版本的Andr​​oid(1.5 1.6等。)

i need to use Base64 on my app (import android.util.Base64;) but Base64 was included in android with 2.2, api lvl 8. Then when i make the import i get this error: Base64 cannot be resolved, and doesn't give me the possibility to import it, because i am making my project with api lvl 3. For some reasons my app have to be compatible with old versions of android (1.5 1.6 etc..)

这是可以使用的Base64不迁移到API lvl8?

it is possible to use Base64 without migrating to api lvl8 ?

推荐答案

使用一个土生土长的实现,而不是:http://android$c$cmonkey.blogspot.com/2010/03/how-to-base64-en$c$c-de$c$c-android.html

Use a home-grown implementation instead: http://androidcodemonkey.blogspot.com/2010/03/how-to-base64-encode-decode-android.html