我尝试将mysql数据库中的http响应值与本地字符串进行比较,但尽管字符串相同但它仍然失败。我错过了什么,暗示可能会有所帮助。
ResponseHandler<String> handleResponse = new BasicResponseHandler();
String phpEchoVal = httpclient.execute(httppost, handleResponse);
String containEmail = phpEchoVal.toString();
txtInfo = (TextView)findViewById(R.id.txtVInfo);
if ((containEmail.equals("success"))){
txtInfo.setText(containEmail);
}else {
txtInfo.setText("Exist");
}
答案 0 :(得分:0)
您是否在清单文件中添加了互联网权限?
<uses-permission
android:name="android.permission.INTERNET" />