2012-08-23 70 views
1

我想在GWT中使用Storage類。我有這個在我的projectname.gwt.xml文件:無法讓存儲類爲GWT工作?

<module rename-to='projectname'> 
    <inherits name='com.google.gwt.user.User'/> 
    <inherits name='com.google.gwt.storage.client.Storage' /> 

    ... 

但在開發模式下啓動項目拋出:

Loading modules 
    com.me.myproject 
    Loading inherited module 'com.google.gwt.storage.client.Storage' 
    [ERROR] Unable to find 'com/google/gwt/storage/client/Storage.gwt.xml' 
    on your classpath; could be a typo, or maybe you forgot to include a 
    classpath entry for source? 
    [ERROR] Line 5: Unexpected exception while processing element 'inherits' 

有我們需要包括它得到一個額外的罐子什麼的工作?

感謝

+1

你[閱讀文檔(HTTPS: //developers.google.com/web-toolkit/doc/latest/DevGuideHtml5Storage)?我不認爲你應該繼承它作爲一個模塊。 –

+0

Argh正確 - 我認爲需要它作爲模塊導入。 – user291701

回答

1

存儲GWT的XML文件位於:

<inherits name='com.google.gwt.storage.Storage' /> 

從進口刪除客戶端,你應該罰款