Eclipse Android 2.2项目出错但是Android 4.0没有出错
Eclipse Android 2.2 project error but Android 4.0 no error
当我在 eclipse 中为较低的 android 2.2 标签 API8 创建新项目时,出现了一些错误,我无法修复它们。 appcompat_v7
里面有些问题没有找到 values-v17
- values-v21
而且我的项目文件夹也有一些错误。
创建后......
但是当我为更高的 android 4.0 标签创建项目时 API(14) 没有错误。
创建后......
有什么办法可以解决这个问题。
您需要修改 style.xml 以确保支持 API。请检查这个 post Android AppCompat requires API level 11
这应该可以帮助您解决所面临的问题。
在 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>
像明智的事情改变了。所以参考 android developer.android.com
或者您可以使用 2.2 中的单独样式表。而且也没有看到 style.xml 我们不能说这是确切的问题。
当我在 eclipse 中为较低的 android 2.2 标签 API8 创建新项目时,出现了一些错误,我无法修复它们。 appcompat_v7
里面有些问题没有找到 values-v17
- values-v21
而且我的项目文件夹也有一些错误。
创建后......
但是当我为更高的 android 4.0 标签创建项目时 API(14) 没有错误。
创建后......
有什么办法可以解决这个问题。
您需要修改 style.xml 以确保支持 API。请检查这个 post Android AppCompat requires API level 11
这应该可以帮助您解决所面临的问题。
在 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>
像明智的事情改变了。所以参考 android developer.android.com 或者您可以使用 2.2 中的单独样式表。而且也没有看到 style.xml 我们不能说这是确切的问题。