【问题标题】:Eclipse Android 2.2 project error but Android 4.0 no errorEclipse Android 2.2 项目错误但Android 4.0 没有错误
【发布时间】:2016-07-08 21:42:29
【问题描述】:
当我在 Eclipse 中为较低的 android 2.2 标签 API8 创建新项目时,出现了一些错误,我无法修复它们。 appcompat_v7 里面有些问题没有找到 values-v17 - values-v21 我的项目文件夹也有一些错误。
创建后... ...
但是当我为更高版本的 android 4.0 标签 API(14) 创建项目时没有错误。
创建后... ...
有什么办法可以解决这个问题。
【问题讨论】:
标签:
android
eclipse
sdk
adt
【解决方案1】:
在 4.0 中,他们使用 android: 样式前缀,但在 2.2 中,他们无法识别
在 4.0 中
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="CodeFont" parent="@android:style/TextAppearance.Medium">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textColor">#00FF00</item>
<item name="android:typeface">monospace</item>
</style>
</resources>
在 2.2 中
<style name="WindowTitle">
<item name="singleLine">true</item>
<item name="textAppearance">@style/TextAppearance.WindowTitle</item>
<item name="shadowColor">#BB000000</item>
<item name="shadowRadius">2.75</item>
</style>
明智的事情发生了变化。所以参考安卓developer.android.com
或者您可以使用 2.2 中的单独样式表。而且还没有看到 style.xml,我们不能说这是确切的问题。