私のアンドロイドプロジェクトでは、次の行が実行されないurl接続への連絡先になると、エミュレータを使用してローカルにURLに接続しようとしています。これは、コンソールに上記のコードの仕様8及びスペック6枚の印刷物からコードアンドロイドはhttpポストを実行していません
protected Void doInBackground(Void...params){
InputStream is=null;
String result="";
try{
System.out.println("this is specs6" );
HttpClient httpclient=new DefaultHttpClient();
System.out.println("this is specs8" );
HttpPost httppost= new HttpPost("http://10.0.2.2/API/getSpecialization.php");
HttpResponse response=httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
System.out.println("this is specs7" );
// Get our response as a String.
is = entity.getContent();
}catch(IOException e){
e.printStackTrace();
}
のスニペットが、スペック7印刷されることはありません。何が間違っている可能性がありますか?あなたが何かをしなければならないしかし
を読むことができる方法です アップデート2 UIスレッド
といくつかのコンポーネントを変更するには、エラーを取得するのですか?スタックトレース? –
エラーなし............... – Blaze