eclipse下导入app源代码无法编译import android.webkit.CacheManager;类的问题
来源:互联网 发布:java谁拿了最多奖学金 编辑:程序博客网 时间:2024/06/15 02:02
错误现象:
import android.webkit.CacheManager;
public void clearAppCache() {
// 清除webview缓存
File file = CacheManager.getCacheFileBaseDir();
if (file != null && file.exists() && file.isDirectory()) {
for (File item : file.listFiles()) {
item.delete();
}
file.delete();
}
出现原因是:此类已弃用。 将来的版本中将会删除对HTTP缓存的访问。
This class is deprecated.
Access to the HTTP cache will be removed in a future release.
参考API:http://www.android-doc.com/reference/android/webkit/CacheManager.html
解决方案是:
降低项目的编译SDK版本
project.properties 里面 Android版本改到15试试~~
0 0
- eclipse下导入app源代码无法编译import android.webkit.CacheManager;类的问题
- import android.support.v4.app.NavUtils错误无法编译问题
- The import android.webkit.CacheManager cannot be resolved
- eclipse import android project出错,无法编译
- AndroidStudio无法打开import导入工程和无法编译的问题
- eclipse无法编译工程的问题(导入自原博客)
- eclipse导入android的app
- 导入android项目的问题:How to import existing Android project into Eclipse
- 【求助】Eclipse无法导入android项目的问题
- 【eclipse import project】Eclipse导入Android项目的正确方法
- JavaWeb源代码导入Eclipse遇到的问题
- eclipse无法导入import pygame解决方法
- eclipse无法导入import pygame解决方法
- Ubuntu 11.04下编译Webkit源代码
- eclipse导入/编译hadoop源代码
- Zookeeper 源代码编译导入Eclipse
- eclipse 编译JAVA 项目导入的WEB项目 无法编译问题
- MyEclipse或Eclipse无法查看类的源代码问题
- 经典算法(一):冒泡排序
- 1016. Phone Bills (25)(不需要数据结构,但题有点难)
- 第十六周项目3—归并排序算法的改进
- shell-read 用法
- MyEclipse 每次保存都要building workspace。myeclipse保存了无效等问题
- eclipse下导入app源代码无法编译import android.webkit.CacheManager;类的问题
- 【学习】树链剖分
- C++中struct与Class的区别
- C语言——链表倒数结点
- 文件比较工具列表
- 16进制字符串与byte数组互转
- 《微服务》八特性--标注性考究
- GCC编译选项
- usaco顺序的分数 Ordered Fractions