/** 升级成功,更新升级日期和版本号,和版本code */ private void alearyUpdateSuccess() { SharedPreferences sharedPreference = mContext.getSharedPreferences(SETTING_UPDATE_APK_INFO, 0); sharedPreference .edit() .putString(UPDATE_DATE, sdf.format(new Date())) .putString(APK_VERSION, apkInfo.getApkVersion()) .putInt(APK_VERCODE, apkInfo.getApkCode()) .commit(); }