eclipse错误:parseSdkContent failed Could not initialize class android.graphics
来源:互联网 发布:索尼kdl60w600b装软件 编辑:程序博客网 时间:2024/05/20 22:38
自从我安装了Android Studio,eclipse就出现了问题,这个问题困扰了我几天,仅此记录。
因为安装Android Studio同时安装了自带的Android SDK,自带的SDK是android6.0版本。
于是,在我的windows上同时存在两个Android SDK,我想各自用自己的,eclipse就出现了问题。
eclipse从外部导入工程是没问题的,但是新建工程就出现了问题:
ERROR:parseSdkContent failed Could not initialize class android.graphics
或者
ERROR:parseSdkContent failed Could not initialize class android.graphics.Typeface
我在网上找了N多答案,常见有以下版本,仅供尝试:
开Eclipse出现错误“parseSdkContent failed”,Android的模拟器启动不了。尝试了不少方法,终于搞定。
1.删除文件夹 C:\Documents and Settings\covics\.android
2.重装Eclipse,因为是绿色版,所以就是删除原来的Eclipse文件夹后,再解压一个完全未配置的Eclipse就行了。然后再重新安装ADT及Android SDK(重新在Eclipse配置下路径就可以)。这一步我做了,但是貌似不是必需的,可以略过。
3.删除工作目录下的的.metadata文件夹
我试了后,问题依旧存在,我隐隐感觉到是两个版本SDK问题所致,但不知何故。
于是我又找到了一种解决方案:
Here is another cause and fix that might help .. This is happening because of existence of 2 versions of SDK in the same machine but in case you have only one version (probably it is 21) just download the SDK platform for API 20 (4.4W) as there is a problem in 21's "layoutlib.jar"). start applying the following:
Close Eclipse
Navigate to your sdk folder (something like C:\adt-bundle-windows-x86_64-20140321\sdk)
Go to platforms folder -> android-21 folder -> data folder and rename layoutlib.jar (for backup only)
Copy the same file (layoutlib.jar) from your android-20 folder to this folder "android-21"
Start Eclipse
1、首先,关闭你的eclipse。
2、在你的SDK目录,找到sdk/platforms/android-21/data文件夹。
3、找到layoutlib.jar文件并创建副件,也就是备份一个。
4、然后找到android-20/data文件夹,找到layoutlib.jar文件,复制到android-21/data文件夹覆盖。
5、打开eclipse,新建工程,不再出现错误。
看这问题的解决办法,应该是android-21的layout源错误,怪不得我新建工程后报错,
说是找不到style下的v-21什么的。
解决方案来源:
eclipse - parseSdkContent failed Could not initialize class android.graphics.Typeface - Stack Overflow
http://stackoverflow.com/questions/24636393/parsesdkcontent-failed-could-not-initialize-class-android-graphics-typeface
- eclipse错误:parseSdkContent failed Could not initialize class android.graphics
- parseSdkContent failed Could not initialize class android.graphics.Typeface
- parseSdkContent failed Could not initialize class android.graphics.Typeface
- parseSdkContent failed Could not initialize class android.graphics.Typeface
- parseSdkContent failed Could not initialize class android.graphics.Typeface异常
- parseSdkContent failed Could not initialize class android.graphics.Typeface
- parseSdkContent failed Could not initialize class android.graphics.Typeface
- parseSdkContent failed Could not initialize class android.graphics
- parseSdkContent failed Could not initialize class android.graphics
- Eclipse中安卓开发遇到parseSdkContent failed Could not initialize class android.graphics.Typeface问题
- Eclipse中安卓开发遇到parseSdkContent failed Could not initialize class android.graphics.Typeface问题
- Eclipse中安卓开发遇到parseSdkContent failed Could not initialize class android.graphics.Typeface问题
- Android 5.0 parseSdkContent failed Could not initialize class android.graphics.Typeface
- Android 5.0 parseSdkContent failed Could not initialize class android.graphics.Typeface
- 创建Android 项目,遇到parseSdkContent failed Could not initialize class android.graphics.Typeface
- 关于 parseSdkContent failed Could not initialize class android.graphics.Typeface 报错
- parseSdkContent failedCould not initialize class android.graphics 的解决方法
- 解决"Could not initialize class android.graphics.Typeface"
- 构建工具之---ant
- MyEclipse中改变.jsp默认的设计图模式为jsp editor
- EJB基础二 异步调用
- 学习笔记—解析XML
- 关于ztree创建
- eclipse错误:parseSdkContent failed Could not initialize class android.graphics
- 读配置文件
- phpbb简体中文语言包的安装
- Android —— 开发出现的问题小结
- bootstrap源码学习之消息提示alert(一)
- mysql单表60亿记录等大数据场景的MySQL优化和运维之道
- UVA 1424 - Salesmen 刘汝佳的动归练习 ★★★
- 广电双向网
- redhat6.5下配置安装yum源