2013-08-27 24 views
1

你好,我正在寫一個Android應用程序從服務器獲取的文章,我的問題是,我得到一個未處理的異常類型的URISyntaxException當我構造URL,她是我的代碼的URISyntaxException android系統

public class ArticleActivity extends ListActivity { 

    protected static Resources resources; 
    // url to make request 
    private static URI url = new URI("http://" 
      + resources.getString(R.string.SERVER_IP) + ":" 
      + resources.getString(R.string.SERVER_PORT) 
      + "/qareeboon/requests11/getArticleDetails?uuid=" 
      + Session.SESSION_UUID); 

回答

3

你可以使用以下句法for uri

Uri myUri = Uri.parse("http://stackoverflow.com") 
+0

謝謝你現在好了 –