The project XXX does not have any GWT SDKs on its build path

前端 未结 7 1074
悲&欢浪女
悲&欢浪女 2020-12-08 10:38

Sometimes, when I start Eclipse (Java EE IDE for Web Developers, Indigo SR 1) on my MacOSX Lion, my GWT (2.4.0) project initially fails to compile<

相关标签:
7条回答
  • 2020-12-08 11:02

    Also an other soulutin is to move the GWT SDK to the top of the Library list(right after your project) on the Properties/Java Build Path/Order and Export page.

    0 讨论(0)
  • 2020-12-08 11:05

    In my case the GWT_CONTAINER was added below the JRE_CONTAINER. Fixing this manually within my .classpath file solved the problem!

    <classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
    <classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
    
    0 讨论(0)
  • 2020-12-08 11:08

    I encountered the same problems as described above. But none of the solutions worked.

    What did work was moving the GWT SDK above the other GWT dependencies in the build path. See the following blog (written by my personal hero of the day): Grant Little's Blog

    0 讨论(0)
  • 2020-12-08 11:09

    I tried the above, but had to do a bit more:

    From above:

    • Remove GWT SDK from my project
    • Remove all GWT SDKs from eclipse
    • Download new GWT SDK (2.5.0)
    • Add it to eclipse and to my project

    What I did extra:

    • Edit the .classpath file of my project
    • Move the classpathentry for GWT to just under 'src'
    • Save the .classpath file
    • Close the project
    • Open the project

    And that did it for me. Moving it in the Build Path GUI did not seem to work for me!

    So, the start of my .classpath ended up looking like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <classpath>
        <classpathentry kind="src" path="src"/>
        <classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
        etc...
    
    0 讨论(0)
  • 2020-12-08 11:13

    I believe the problem was occurring because Eclipse had some stale settings about available/linked GWTs.

    Therefore, building on the answer by Chris Cashwell, I recommend the following:

    1. Remove all GWTs from your build path. (You might have more than one GWT on your build path.)
    2. Remove all GWTs linked in Eclipse in Project>Properties>Google>Web Toolkit>Configure SDKs, .
    3. Add only the latest GWT, and make it default.

    EDIT: Sometimes, I still need to do a Project > Clean, but this is rare now.

    0 讨论(0)
  • 2020-12-08 11:13

    You could use maven for compilation and setting up your workspace.

    However I guess this would be overkill for you.

    There is a Maven GWT Plugin.

    0 讨论(0)
提交回复
热议问题