1 回答

TA貢獻(xiàn)1876條經(jīng)驗(yàn) 獲得超5個(gè)贊
我沒(méi)有查看我的 java,arraylist而是檢查了我的應(yīng)用程序一側(cè)response是否為空。php像這樣:
if (response.isEmpty()) {
SharedPreferences sharedPreferencesMatchingContactsAsArrayList = PreferenceManager.getDefaultSharedPreferences(getApplication());
SharedPreferences.Editor editorMatchingContactsAsArrayList = sharedPreferencesMatchingContactsAsArrayList.edit();
editorMatchingContactsAsArrayList.putString("MatchingContactsAsArrayList", "");
editorMatchingContactsAsArrayList.commit();
} else {
這解決了我的問(wèn)題,更新了sharedpreferences.
添加回答
舉報(bào)