我想为我的第一个Android应用定义一个主题。我使用Eclipse并且我遵循this tutorial但是有问题。
步骤:
一个。我使用内容
创建values / styles.xml文件<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="default_splashScreen">
<item name="android:background">@drawable/bg</item>
</style>
</resources>
B中。我使用内容
创建values / themes.xml文件<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme" parent="android:Theme">
<item name="SplashScreen">@style/default_splashScreen</item>
</style>
</resources>
现在,Eclipse总是抱怨项目名称=“SplashScreen”节点,并显示消息“找不到资源...”。我只是想让SplashScreen调用default_splashScreen样式。
有什么问题? THX!
答案 0 :(得分:1)
Eclipse只是在文本编辑器中抱怨,还是在你真正尝试编译和运行应用程序时?也许Eclipse没有正确更新项目 - 请尝试以下方法之一: