Android clean application data
问题 I am developing a app in which there is a button which will clear all the data (which will include files, databases, shared preferences) related with this app. any one can let me know how to clear application data by code. 回答1: call clearApplicationData to delete app's data: /** * Call this method to delete any cache created by app * @param context context for your application */ public static void clearApplicationData(Context context) { File cache = context.getCacheDir(); File appDir = new