我正嘗試使用SimpleFTP將jpg圖像上傳到FTP服務器。Java.lang.NoClassDefFoundError:org.jibble.simpleftp.SimpleFTP在Android中上傳FTP中的圖像
以下是我的代碼:
try
{
SimpleFTP ftp = new SimpleFTP();
ftp.connect("URL", 21, "User Name", "Password");
// Set binary mode.
ftp.bin();
// Change to a new working directory on the FTP server.
ftp.cwd("/demo1/RChatAPI/usrPhotos/");
// Upload some files.
ftp.stor(new File("/mnt/sdcard/aaa.jpg"));
// Quit from the FTP server.
ftp.disconnect();
}
catch (IOException e)
{
Log.v("Upload","Error Is:"+e);
}
而且我得到了以下錯誤java.lang.NoClassDefFoundError
http://stackoverflow.com/questions/11154252/how-to-solve-this-java-lang-noclassdeffounderror-org-apache-commons-io-output-d –
@shylendra這些代碼是在java我需要在Android的解決方案! –