【发布时间】:2017-05-31 17:51:36
【问题描述】:
我不知道为什么,但是当我尝试使用 Log 时,在我的 Android Studio 代码中。它不会显示在 Android Monitor 上。我选择了所有选项:没有过滤器并选择了我的手机。 有代码示例:
JSONObject req = new JSONObject();
try {
req.put("username", username_login.getText().toString());
req.put("password", password_login.getText().toString());
req.put("path", "login");
Log.i("request", username_login.getText() + " " + password_login.getText().toString() + " " + password_login.getText().toString().length());
new Request(new RequestCallback() {
@Override
public void in_the_end(JSONObject a) {
}}}
}
}).execute(req);
【问题讨论】:
-
可能这个请求没有被执行。请显示minimal reproducible example
-
如果我使用 Toast 方法有效并且此代码 100% 有效
-
尝试在命令行中使用
adb logcat