0

I am having a problem with an ftp upload file from sdcard. For FTP I am using an external library. It was running fine but for the last 3-4 days I am getting an error. Fyi, I am using ftp4j-1.6.1.jar

Here is code:

it.sauronsoftware.ftp4j.FTPClient con = new it.sauronsoftware.ftp4j.FTPClient();
                    con.connect("ftp");
                    con.login("as", "addd@2012");
                    con.changeDirectory("/RequestContent/images");
                    con.setPassive(true);
                    con.setType(FTPClient.TYPE_BINARY);
                     con.upload(new java.io.File(Environment
                     .getExternalStorageDirectory()
                    + "/audiometer/"
                     + str_file_name));
                    con.logout();
                    con.disconnect(true);

Error:

05-05 14:40:07.712: ERROR/AndroidRuntime(10006): FATAL EXCEPTION: main
05-05 14:40:07.712: ERROR/AndroidRuntime(10006): java.lang.NoClassDefFoundError: it.sauronsoftware.ftp4j.FTPClient
05-05 14:40:07.712: ERROR/AndroidRuntime(10006):     at com.RecordingAppOLD.ImageCaptureActivity$3.onClick(ImageCaptureActivity.java:114)
05-05 14:40:07.712: ERROR/AndroidRuntime(10006):     at android.view.View.performClick(View.java:2533)
05-05 14:40:07.712: ERROR/AndroidRuntime(10006):     at android.view.View$PerformClick.run(View.java:9320)
05-05 14:40:07.712: ERROR/AndroidRuntime(10006):     at android.os.Handler.handleCallback(Handler.java:587)
05-05 14:40:07.712: ERROR/AndroidRuntime(10006):     at android.os.Handler.dispatchMessage(Handler.java:92)
05-05 14:40:07.712: ERROR/AndroidRuntime(10006):     at android.os.Looper.loop(Looper.java:150)
05-05 14:40:07.712: ERROR/AndroidRuntime(10006):     at android.app.ActivityThread.main(ActivityThread.java:4385)
05-05 14:40:07.712: ERROR/AndroidRuntime(10006):     at java.lang.reflect.Method.invokeNative(Native Method)
05-05 14:40:07.712: ERROR/AndroidRuntime(10006):     at java.lang.reflect.Method.invoke(Method.java:507)
05-05 14:40:07.712: ERROR/AndroidRuntime(10006):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)
05-05 14:40:07.712: ERROR/AndroidRuntime(10006):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
05-05 14:40:07.712: ERROR/AndroidRuntime(10006):     at dalvik.system.NativeStart.main(Native Method)
4

0 回答 0