apache - Android FTPClient ftpClient = new FTPClient(); causes crash only in release version -
i using apache commons-net-3.3 jar , have researched previous threads make sure configured correctly in build path.
my android app works fine in debug mode on several tablets when release code using ant , publish it, code falls on @ :-
ftpclient ftpclient = new ftpclient();
with no error message on same tablets:
code follows.
import org.apache.commons.net.ftp.ftp; import org.apache.commons.net.ftp.ftpclient; @override protected string doinbackground(void... params) { file file = new file(mdbpath); try{ ftpclient ftpclient = new ftpclient(); inetaddress mhostname; mhostname = inetaddress.getbyname(mserverip); ftpclient.connect(mhostname, mport); ftpclient.login(mlogin, mpassword); ftpclient.changeworkingdirectory(mworkingdir); if (ftpclient.getreplystring().contains("250")) { ftpclient.setfiletype(ftp.binary_file_type); bufferedoutputstream buffout = new bufferedoutputstream(new fileoutputstream(new file(file, mdbname))); ftpclient.enterlocalpassivemode(); boolean result = ftpclient.retrievefile(mserverfilename, buffout); buffout.close(); ftpclient.logout(); ftpclient.disconnect(); if (result == false){ return "false"; } } } catch (exception e){ return e.getmessage().tostring(); } return "true"; }
my question is:- don't understand why works in debug mode on same tablets?
Comments
Post a Comment