【问题标题】:Eclipse GWT "There are no CSS files referenced"Eclipse GWT“没有引用 CSS 文件”
【发布时间】:2013-02-04 14:26:34
【问题描述】:

我正在使用 Eclipse Juno Service Release 1,安装了最新的 GWT Designer 插件并运行更新。当我在 GWT Design 中并选择小部件属性的 StyleName 行中的 CSS 按钮时,我收到消息“没有从模块或 HTML 引用的 CSS 文件”。

我的 gwt.xml 是:

<module>
<inherits name="com.google.gwt.user.User"/>
<inherits name="com.google.gwt.user.theme.standard.Standard"/>
<entry-point class="org.AwardTracker.client.AwardTracker"/>
<stylesheet src="org.AwardTracker.AwardTracker.css"/>

<!--  servelet context - path is arbitrary, but must match up with the rpc init inside java class -->
<!--  Tomcat will listen for this from the server and waits for rpc request in this context -->
<servlet class="org.AwardTracker.server.MySQLConnection" path="/MySQLConnection" />
    <inherits name="com.google.gwt.user.theme.standard.Standard"/>
    <inherits name="com.google.gwt.user.theme.chrome.Chrome"/>
    <inherits name="com.google.gwt.user.theme.dark.Dark"/>
</module>

我的 CSS 在 org.AwardTracker 中(直接在 gwt.xml 文件上方)。

我搜索到的所有提示都是更新 GWT Designer。这些提示都是几年前的,我有最新版本。

知道我做错了什么吗?

【问题讨论】:

    标签: java css eclipse gwt


    【解决方案1】:

    你必须先检查你在war文件夹中的css文件 bcoz css文件和html文件存在于war文件夹中,而不是检查html文件中的链接

     <link type="text/css" rel="stylesheet" href="abc.css">
    

    【讨论】:

    • Ruchi ,我们必须在xml文件中给出那个链接??
    • 是的..但也像我说的那样在 html 文件和 xml 文件中给出
    【解决方案2】:

    您需要正确设置项目包和引用。您可以按照此处提供的有关项目/文件组织的解决方案 - Editing CSS in Gwt WindowBuilder

    【讨论】:

    • 您可以通过选择答案来关闭问题:)
    【解决方案3】:

    由于路径的原因,似乎找不到文件。您已经在xml 文件中,请尝试

    <stylesheet src="AwardTracker.css"/>
    

    希望这会有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-09-17
      • 2020-11-17
      • 2015-02-28
      • 2018-09-08
      • 1970-01-01
      • 2011-09-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多