【发布时间】:2019-09-22 00:44:20
【问题描述】:
我想在 Android 中将 edittext 值添加到简单的 GET 请求 URL。但是我在连接时遇到了一些错误。这就是我要发送的。
String forgot_email = et_email.getText().toString(); //gives me proper email output
final String final_url = "http:abc....../"+forgot_email.getText().toString(); // Here edittext value is not appending.
final_url = "http:abc....../" // logs value shows its not appending in the end.
我想将此 URL 发送到服务器。
http:abc....../EMailID
我们将不胜感激任何回复。
【问题讨论】:
-
应该是
String final_url = "http:abc....../"+ et_email.getText().toString();。et_email而不是forgot_email -
@elbertrivas 那行不通。显示日志值
-
@jeetdeveloper 尝试从您的字符串中删除 final 并检查 url 的日志。
-
@Ashish 没有最后的凌空抽射没有进一步进行.. 根据日志的 url 值是 http:abc....../
-
你使用的是什么网络库?
标签: android string android-volley string-concatenation