Problem fetching XML file in Java

前端 未结 4 1136
感情败类
感情败类 2021-01-07 13:29

I am trying to use Google\'s unofficial weather API in an Android Application.

I use this code:

//get the text from the edit text
    userZip = zipCo         


        
4条回答
  •  甜味超标
    2021-01-07 14:29

    I've ran into this problem with JDOM2 and it was really a NetworkOnMainThreadException in disguise. Threw it off the main thread and everything worked.

    new Thread(new Runnable() {
                @Override
                public void run() {
                    
                }
            }).start();
    

提交回复
热议问题