一段很簡單的代碼:
1 String url = "http://10.122.10.197/r28crm/login.aspx?uid=yepl&pwd=1&t=t";
2 try
3 {
4 DefaultHttpClient client = new DefaultHttpClient();
5 HttpGet request = new HttpGet(url);
6 HttpResponse response = client.execute(request);//每次調試到這一句就會出現Source Not Found.
7 StatusLine status = response.getStatusLine();
8 int statusCode = status.getStatusCode();
9 switch(statusCode) {
10 case 200:
11 break;
12 }
13 }catch(ClientProtocolException ex) {
14
15 }catch(IOException ex){
16
17 }
我在AndroidManifest.xml有配置?
<uses-permission android:name="android.permission.INTERNET"/>
我找了好多資料都沒能解決這個問題。求各位大俠指點。。另附上問題圖片:
大家能指點下么?我這個是在模擬器里面用瀏覽器是能訪問那個Url的。
添加回答
舉報
0/150
提交
取消