友人3人とgwt(2.6)でアプリを開発しています。数週間前、スーパー開発モードの使用を開始しました。私たち 2 人が ImageBundles を使用できないことを除いて、すべてがうまく機能します。どうやらいくつかの画像をロードする SuggestBox を含めたいと思ったときに始まりました。GWT コンパイルに失敗しました。私は何度もグーグルで検索しましたが、修正できなかったので、別の作業を開始しました。GWT コンパイルに失敗しました。同じエラー。回避策: ImageResourceBundle を使用せずにイメージをロードします。本当に奇妙なのは、私たちのうちの 2 人は Windows で作業しており、1 人は ubuntu で作業しており、私は mac を使用しています。コンパイルは、ubuntu といずれかの Windows マシンで正常に動作します。他のマシンでは、何を試してもコンパイル エラーは常に同じままです。
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
Computing all possible rebind results for 'com.google.gwt.user.client.ui.MenuBar.Resources'
Rebinding com.google.gwt.user.client.ui.MenuBar.Resources
Invoking generator com.google.gwt.resources.rebind.context.InlineClientBundleGenerator
[ERROR] No @com.google.gwt.resources.ext.ResourceGeneratorType was specifed for type com.google.gwt.resources.client.ImageResource or its supertypes
[ERROR] Errors in 'com/google/gwt/user/client/ui/MenuBar.java'
[ERROR] Line 212: Failed to resolve 'com.google.gwt.user.client.ui.MenuBar.Resources' via deferred binding
Computing all possible rebind results for 'com.google.gwt.user.client.ui.impl.ClippedImageImpl.Template'
Rebinding com.google.gwt.user.client.ui.impl.ClippedImageImpl.Template
Invoking generator com.google.gwt.safehtml.rebind.SafeHtmlTemplatesGenerator
Constructing interface com.google.gwt.user.client.ui.impl.ClippedImageImpl.Template
Generating method body for image()
[ERROR] Required annotation @Template not present on interface method public abstract com.google.gwt.safehtml.shared.SafeHtml image(com.google.gwt.safehtml.shared.SafeUri clearImage, com.google.gwt.safecss.shared.SafeStyles style)
[ERROR] Errors in 'com/google/gwt/user/client/ui/impl/ClippedImageImpl.java'
[ERROR] Line 104: Failed to resolve 'com.google.gwt.user.client.ui.impl.ClippedImageImpl.Template' via deferred binding
Computing all possible rebind results for 'com.google.gwt.user.client.ui.impl.ClippedImageImpl.DraggableTemplate'
Rebinding com.google.gwt.user.client.ui.impl.ClippedImageImpl.DraggableTemplate
Invoking generator com.google.gwt.safehtml.rebind.SafeHtmlTemplatesGenerator
Constructing interface com.google.gwt.user.client.ui.impl.ClippedImageImpl.DraggableTemplate
Generating method body for image()
[ERROR] Required annotation @Template not present on interface method public abstract com.google.gwt.safehtml.shared.SafeHtml image(com.google.gwt.safehtml.shared.SafeUri clearImage, com.google.gwt.safecss.shared.SafeStyles style)
[ERROR] Errors in 'com/google/gwt/user/client/ui/impl/ClippedImageImpl.java'
[ERROR] Line 96: Failed to resolve 'com.google.gwt.user.client.ui.impl.ClippedImageImpl.DraggableTemplate' via deferred binding
[ERROR] Compiler returned false
どうすればいいのか本当にわかりません。Eclipse と Tomcat のほぼすべての設定/構成ファイルをチェックしました。それはすべて同じです。誰かがどこを見ればいいのか考えていますか? 多分私は間違った場所を探しています。あなたが私に与えることができるどんな助けにも感謝します.
追加情報 (更新) :
- ant でアプリケーションをビルドすると、gwt-compile はエラーなしで実行されます。
- GoogleプラグインなしでEclipseを使用しています。
- 開発モードでは、Web アプリケーションは tomcat7 経由で開始されます。
- スーパー開発モードは、Web アプリケーション内 (Servlet.init() 内) で呼び出されます。そのため、gwt-dev jar を tomcat ランチャーのクラスパスに追加する必要がありました。
- gwt
new SuggestBox()
ソース コードのどこかにインクルードすると、一部のマシンで gwt-compile-error が発生します。すべてがnew SuggestBox()
どこでもコンパイルされます。
クラスパスまたは gwt-compile-sourcepath の問題だと思います。しかし、使用するさまざまなマシンに違いは見られません。