【发布时间】:2014-09-27 02:51:37
【问题描述】:
我在 linux 中安装了 Luna,并从 juno/kepler 导入了我的项目(现在不确定),我收到以下错误
我的 R 文件消失了,我认为这是由于 xml 解析错误造成的。
每当打开与布局相关的任何 *.xml 时,我都会收到此消息:
parseSdkContent failed
Could not initialize class android.graphics.Typeface x 2(出现多个错误)
作为建议的答案,我在 /home 中删除了 .android,但错误仍然存在。
我在我的项目中运行 Android 2.2(我可以看到包含该库)虽然 Right Click -> Project Properties -> Android -> Has Android 2.2, Android 4.4W and Android L (Preview) ALL 未选中并且“应用”按钮没有当我关闭窗口时工作(选择 android 2.2)。
每当我打开 Android SDK Manager 时都会收到此消息
parseSdkContent failed
Could not initialize class android.graphics.Typeface
在我的 styles.xml 文件中出现以下错误:
error => <style name="AppBaseTheme" parent="android:Theme.Holo.Light">
<!-- API 11 theme customizations can go here. -->
</style>
error: Error retrieving parent for item: No resource found that matches the given name
'android:Theme.Holo.Light'.
和
error => <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<!-- API 14 theme customizations can go here. -->
</style>
error: Error retrieving parent for item: No resource found that matches the given name
'android:Theme.Holo.Light.DarkActionBar'.
我在 android sdk 管理器 中检查了更新,但没有发现,已安装:
- 工具:
- Android SDK 工具
- Android SDK 平台工具
- Android SDK 构建工具
- ANDROID L API 20,L 预览版:
- SDK 平台 Android L 预览版
- Android TV ARM EABI v7a 系统映像
- Android TV Intel x86 Atom 系统映像
- ANDROID 4.4W API 20:
- SDK 平台
- Android Wear ARM EABI v7a 系统映像
- Android Wear Intel x86 Atom 系统映像
- ANDROID 2.2 API 8:
- SDK 平台
- Android 支持库
这是我的 AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.diverse.just"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="20" />
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.diverse.just.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.diverse.just.LoginActivity"
android:label="@string/title_activity_login"
android:windowSoftInputMode="adjustResize|stateVisible" >
</activity>
</application>
【问题讨论】: