gpt4 book ai didi

class - 自定义类 : No class matching "..." in urn:import: 的 GWT 延迟绑定(bind)失败

转载 作者:行者123 更新时间:2023-12-04 18:11:28 26 4
gpt4 key购买 nike

我正在开发几个我希望能够与 UiBinder 一起使用的自定义小部件。不幸的是,我一直在浪费我的生命来追踪以下错误:

urn:import:...中没有匹配“...”的类

这似乎是任何时候抛出的包罗万象的异常 任意 阻止 GWT 编译器处理它的类中的错误。这包括类的整个依赖关系树中的任何内容。

为了节省我自己和遇到相同问题的任何人一些时间和痛苦,让我们在这里编制一份 list ,列出最意想不到和最难找到的原因。我将从我最新的一个开始,这让我决定在这里发布这个。

最佳答案

因此,我正在使用 CellList:

private static RelationshipViewerUiBinder uiBinder = GWT.create(RelationshipViewerUiBinder.class);

@UiField(provided=true)
CellList<String> prioritisedDisplay;

public RelationshipViewer() {

prioritisedDisplay = new CellList<>(new TextCell());
initWidget(uiBinder.createAndBindUi(this));
}

注意 CellList 上的 Java 7 样式 <>。尽管我的 IDE 提出了相反的抗议,但事实证明您确实需要在该新调用中明确说出 CellList< String> ,否则它将无法编译,您得到的只是上述错误。顺便说一句,谢谢,这个问题的存在促使我仔细检查了我的代码,并且可能为我节省了几个小时!这修复了它:
private static RelationshipViewerUiBinder uiBinder = GWT.create(RelationshipViewerUiBinder.class);

@UiField(provided=true)
CellList<String> prioritisedDisplay;

public RelationshipViewer() {

prioritisedDisplay = new CellList<String>(new TextCell());
initWidget(uiBinder.createAndBindUi(this));
}

关于class - 自定义类 : No class matching "..." in urn:import: 的 GWT 延迟绑定(bind)失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13243894/

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