Cannot delete cache in xperia mini

I play a video so that it stores a lot of data. I can’t delete the cache in xperia mini, it works fine in other phones.

I tried

mWebview.clearCache(true); 

and

 File cacheDir = this.getCacheDir(); File[] files = cacheDir.listFiles(); if (files != null) { for (File file : files) file.delete(); } 

But there is always an error in log-cat:

 01-18 10:31:00.878: E/AndroidRuntime(2364): FATAL EXCEPTION: WebViewWorkerThread 01-18 10:31:00.878: E/AndroidRuntime(2364): android.database.sqlite.SQLiteDiskIOException: error code 10: disk I/O error 01-18 10:31:00.878: E/AndroidRuntime(2364): at android.database.sqlite.SQLiteStatement.native_execute(Native Method) 01-18 10:31:00.878: E/AndroidRuntime(2364): at android.database.sqlite.SQLiteStatement.execute(SQLiteStatement.java:61) 01-18 10:31:00.878: E/AndroidRuntime(2364): at android.database.sqlite.SQLiteDatabase.delete(SQLiteDatabase.java:1640) 01-18 10:31:00.878: E/AndroidRuntime(2364): at android.webkit.WebViewDatabase.clearCache(WebViewDatabase.java:707) 01-18 10:31:00.878: E/AndroidRuntime(2364): at android.webkit.CacheManager.clearCache(CacheManager.java:582) 01-18 10:31:00.878: E/AndroidRuntime(2364): at android.webkit.WebViewWorker.handleMessage(WebViewWorker.java:194) 01-18 10:31:00.878: E/AndroidRuntime(2364): at android.os.Handler.dispatchMessage(Handler.java:99) 01-18 10:31:00.878: E/AndroidRuntime(2364): at android.os.Looper.loop(Looper.java:130) 01-18 10:31:00.878: E/AndroidRuntime(2364): at android.os.HandlerThread.run(HandlerThread.java:60) 
+4
source share

Source: https://habr.com/ru/post/1391584/


All Articles