0
使用上JSoup網站上的導遊,我寫了下面的代碼:的Android JSoup連接問題
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
try {
Document doc = Jsoup.connect("http://google.com").get();
Elements links = doc.getElementsByTag("a");
for(Element ele : links){
Log.i("Menu", ele.text());
}
} catch (IOException e) {
}
setContentView(R.layout.main);
}
我在清單文件中添加Internet權限,但它不斷拋出IOException異常!
哪一個呢?請分享整個異常消息和堆棧跟蹤。 – BalusC 2011-06-10 20:02:51