gpt4 book ai didi

android - Eclipse Android 2.2项目报错但是Android 4.0没有报错

转载 作者:行者123 更新时间:2023-11-29 17:22:16 26 4
gpt4 key购买 nike

当我在 eclipse 中为较低的 android 2.2 标签 API8 创建新项目时,出现了一些错误,我无法修复它们。 appcompat_v7 里面有一些问题 no found values-v17 - values-v21 我的项目文件夹也有一些错误。

enter image description here

创建后......

enter image description here

但是当我为更高版本的 android 4.0 标签 API(14) 创建项目时没有错误。

enter image description here

创建后......

enter image description here

有什么办法可以解决这个问题。

最佳答案

在 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 的情况下,我们不能说这就是问题所在。

关于android - Eclipse Android 2.2项目报错但是Android 4.0没有报错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36147008/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com