修改登录空指针问题

Fatal Exception: java.lang.RuntimeException
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
This commit is contained in:
18401019693 2023-02-09 14:15:05 +08:00
parent 859f54b1e1
commit 3549c25cca

View File

@ -608,6 +608,7 @@ public class EntryActivity extends AppCompatActivity {
private void onLoginSuccess(int code, String msg, String[] info) { private void onLoginSuccess(int code, String msg, String[] info) {
Log.e("", code + "code" + info.toString()); Log.e("", code + "code" + info.toString());
if (code == 0 && info.length > 0) { if (code == 0 && info.length > 0) {
JSONObject obj = JSON.parseObject(info[0]); JSONObject obj = JSON.parseObject(info[0]);
String uid = obj.getString("id"); String uid = obj.getString("id");
String token = obj.getString("token"); String token = obj.getString("token");