My favorites | Sign in
Project Home Downloads Wiki Issues Source

This is not the latest version.
To see the latest version,
go to GWT Developer's Guide (latest)

GWT compiler cannot resolve import because module XML file does not point to resource.
Updated Feb 4, 2010 by

The import cannot be resolved

Although you have successfully compiled the project class files in an IDE, when invoking the GWT compiler for the first time on a new project using one of the APIs provided with the GWT Google API, you come across an error similar to the following:

$ ./gearsTest-compile
Analyzing source in module 'com.example.gearsTest'
   [ERROR] Errors in '/Users/zundel/Documents/workspace2/galgwt-issue3/src/com/example/client/'
      [ERROR] Line 9:  The import cannot be resolved
      [ERROR] Line 26:  Gears cannot be resolved

The problem is that there is no package on the module source path.


This can be resolved by updating the module XML file (.gwt.xml) in either of two ways.

  • Add a <source> tag that adds the package to the module source path.
  • If your third party library provides one, add an <inherits> tag.
For using the Gears package in GWT Google API, the appropriate line is:

   <inherits name=''>

Sign in to add a comment
Powered by Google Project Hosting