Notice
Recent Posts
Recent Comments
올해는 머신러닝이다.
안드로이드에서 Base64 파일 못찾아서 헤롱거릴때.. 본문
그냥 Base64 자바파일을 src에 패키지 이름 추가하고 사용하면 된다..18181818..ㅋㅋ
The official documentation states that base64 encode and decode in Android is in the Android.util package. But when you go to use it you will find it's not there!
After much searching, I confirmation Android left base64 encode and decode out of the Android.util package. So what to do? Don't worry, Robert W. Harder has but together a very fast Base64 encoding and decoding class you can include in your project. Here is how to add base64 encode and decode to your project.
Step 1. Visit Robert's website http://iharder.sourceforge.net/current/index.html and download the class file.
Step 2. The zip file you downloaded in step 1 includes the base64 class and a folder with examples and documentation.
Step 3. Copy the Base64.java class file into your project. Copy into your appropriate "src" folder.
Step 4. Refresh your project so the new file is included.
Step 5.When the Base64.java file is included in your project, you will get the following error "The declared package does not match the expected package". Fix this by opening the class file and adding a package declaration that matches your project.
Step 6. Done. You're ready to base64 encode and decode.
The official documentation states that base64 encode and decode in Android is in the Android.util package. But when you go to use it you will find it's not there!
After much searching, I confirmation Android left base64 encode and decode out of the Android.util package. So what to do? Don't worry, Robert W. Harder has but together a very fast Base64 encoding and decoding class you can include in your project. Here is how to add base64 encode and decode to your project.
Step 1. Visit Robert's website http://iharder.sourceforge.net/current/index.html and download the class file.
Step 2. The zip file you downloaded in step 1 includes the base64 class and a folder with examples and documentation.
Step 3. Copy the Base64.java class file into your project. Copy into your appropriate "src" folder.
Step 4. Refresh your project so the new file is included.
Step 5.When the Base64.java file is included in your project, you will get the following error "The declared package does not match the expected package". Fix this by opening the class file and adding a package declaration that matches your project.
Step 6. Done. You're ready to base64 encode and decode.
'Android > Tip&Tech' 카테고리의 다른 글
안드로이드 테이블 존재여부 확인하기 - Sqlite mater table query (0) | 2010.11.22 |
---|---|
cursoradapter를 커스텀해서 listview에 뿌려주자...^^ (1) | 2010.11.19 |
안드로이드로 사진찍어서 썸네일 이미지 가지고 오기..(중급) (0) | 2010.11.19 |
안드로이드 개발 참고 사이트 모음입니다. (0) | 2010.11.19 |
안드로이드:그림메모 소스.. (0) | 2010.11.14 |