FTP Upload and Download on Android

后端 未结 2 585
野趣味
野趣味 2021-01-13 01:21

I get this error after i have set INTERNET_ACCESS and etc...

 private class AsyncUpload extends AsyncTask{       
    public void f         


        
相关标签:
2条回答
  • 2021-01-13 01:59

    Unknown host exception means either you are missing internet permission or you are not connected to internet Or may be your ftp url is wrong.

    0 讨论(0)
  • 2021-01-13 02:00
            con.connect("ftp.194.90.81.149"); //here i recieve exception
                //the exception is java.unknownhostexception
                //java.net.UnknownHostException: Unable to resolve host "ftp.194.90.81.149": No address associated with hostname
    

    The fact that you're receiving an UnknownHostException means that ftp.194.90.81.149 isn't a real hostname in DNS. I'd suspect that the numeric part of that is what you really want. I.e, try changing that line to

    con.connect("194.90.81.149");
    
    0 讨论(0)
提交回复
热议问题