eclipse下导入app源代码无法编译import android.webkit.CacheManager;类的问题
2016-12-21 22:17
435 查看
错误现象:
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试试~~
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试试~~
相关文章推荐
- AndroidStudio无法打开import导入工程和无法编译的问题
- ubuntu下的eclipse中android sdk manager无法打开问题
- eclipse无法编译工程的问题(导入自原博客)
- ANDROID导入文件后的本地无法编译生成R.java的问题
- ubuntu下的eclipse中android sdk manager无法打开问题
- 解决eclipse中Android SDK Manager更新慢和部分无法显示System Image镜像问题
- eclipse 编译JAVA 项目导入的WEB项目 无法编译问题
- The import android.webkit.CacheManager cannot be resolved
- eclipse 编译JAVA 项目导入的WEB项目 无法编译问题
- eclipse导入svn目录中的android项目预编译失败的问题
- 导入android项目的问题:How to import existing Android project into Eclipse
- Android项目代码导入eclipse环境后的问题解决
- Android项目在eclipse中无法打包apk文件[bin目录下没生成apk文件]问题解决
- eclipse无法导入import pygame解决方法
- 关于eclipse无法自动编译的问题
- 移植windows eclipse下的Android项目到Ubuntu编译环境编译碰到的几个问题
- Android导入的项目再次启动eclipse时提示The import android cannot be resolved的解决办法
- android中导入低版本project可能会遇到的编译问题
- Eclipse中servlet显示无法导入javax.servlet包问题的解决方案
- android中导入低版本project可能会遇到的编译问题