2013-07-17 133 views
1

我正在開發一個簡單的Web應用程序。我正在使用sencha(gxt)框架向用戶顯示圖表。編譯GWT(Sencha Framework)項目時出錯

當我編譯項目時,出現以下錯誤。

[ERROR] Errors in 'file:/E:/eclipse%20Workspace/Chart_Demo/src/com/project/client/Chart_Demo.java' 
     [ERROR] Line 74: No source code is available for type com.sencha.gxt.chart.client.chart.Chart<M>; did you forget to inherit a required module? 

[ERROR] Line 78: No source code is available for type com.sencha.gxt.chart.client.draw.Gradient; did you forget to inherit a required module? 

[ERROR] Line 79: No source code is available for type com.sencha.gxt.chart.client.draw.RGB; did you forget to inherit a required module? 

[ERROR] Line 84: No source code is available for type com.sencha.gxt.chart.client.chart.axis.CategoryAxis<M,V>; did you forget to inherit a required module? 

[ERROR] Line 85: No source code is available for type com.sencha.gxt.chart.client.chart.Chart<M>.Position; did you forget to inherit a required module? 

[ERROR] Line 87: No source code is available for type com.sencha.gxt.chart.client.draw.sprite.TextSprite; did you forget to inherit a required module? 

[ERROR] Line 102: No source code is available for type com.sencha.gxt.chart.client.chart.series.BarSeries<M>; did you forget to inherit a required module? 


[ERROR] Unable to find type 'com.project.client.Chart_Demo' 
     [ERROR] Hint: Previous compiler errors may have made this type unavailable 
     [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly 
Exception in thread "pool-1-thread-1" java.lang.RuntimeException: Unable to read from byte cache 

請幫我解決這個問題。

回答

0

你需要繼承GXT模塊的主模塊(yourapp.gwt.xml)

<inherits name="com.extjs.gxt.ui.GXT" /> 
<inherits name="com.extjs.gxt.themes.Themes" /> 
<inherits name="com.extjs.gxt.charts.Chart" /> 
2

wilome是正確的。模塊描述符中的<inherits>標籤缺失。

但它看起來像蘭吉特使用GXT 3.

在這種情況下,它schould是:

<inherits name='com.sencha.gxt.ui.GXT'/> 
<inherits name='com.sencha.gxt.chart.Chart' />