从Android手机上传图片到服务器 [英] upload image from android phone to the server

查看:273
本文介绍了从Android手机上传图片到服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新到Android试图在服务器上传影像工作。
从网上得到一些样本code。但它是表示我不能够处理它的行一定的误差。任何一个可以帮助我在这种情况下。而这是获取code的链路的http://blog.sptechnolab.com/2011/03/09/android/android-upload-image-to-server/

I am new to android trying to work on uploading image in to server. Got some sample code from the Internet. But it is showing some error in the line which am not able to handle it. Can any one help me in this case. And the link which is fetch the code is http://blog.sptechnolab.com/2011/03/09/android/android-upload-image-to-server/

和误差越来越是

恩codeBytes的方法(字节[])是未定义的类型的Base64

"The method encodeBytes(byte[]) is undefined for the type Base64"

和相应的

and the corresponding

我甚至下载文件base64.java

i have even downloaded base64.java file in the project

推荐答案

有没有连接codeBytes 中的 API 。使用<一个href=\"http://developer.android.com/reference/android/util/Base64.html#en$c$cToString%28byte%5B%5D,%20int,%20int,%20int%29\"相对=nofollow> 连接codeToString

There is no encodeBytes in the API. Use encodeToString.

这篇关于从Android手机上传图片到服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆