The import com.google.gwt.user cannot be resolved

1,000 views
Skip to first unread message

oogie

unread,
Mar 17, 2012, 1:41:07 PM3/17/12
to Google Web Toolkit
I am going through the GWT Tutorials, specifically the "Making Remote
Procedure Calls" tutorial, and I have created an interface with the
following provided code:

package com.google.gwt.sample.stockwatcher.client;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("stockPrices")
public interface StockPriceService extends RemoteService {

StockPrice[] getPrices(String[] symbols);
}

I am getting the following errors:
The import com.google.gwt.user cannot be resolved
RemoteServiceRelativePath cannot be resolved to a type
RemoteService cannot be resolved to a type

I am using GWT 2.4.0, which I understand does not align with the
tutorial, but unfortunately I cannot think of how I should update the
provided code in the tutorial to 2.4. How can I fix the above code to
eliminate these errors? Thanks in advance for any help.

Thomas Broyer

unread,
Mar 17, 2012, 1:58:57 PM3/17/12
to google-we...@googlegroups.com
There's nothing to fix in that code. You're probably missing something in your setup (classpath, *.gwt.xml, I don't know)

黄东辉

unread,
Mar 17, 2012, 8:51:05 PM3/17/12
to google-we...@googlegroups.com
Please be sure that you import gwt-user.jar to your buildpath.Good luck to you.

2012/3/18 Thomas Broyer <t.br...@gmail.com>
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/8lk5YjHGaokJ.

To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

pop.ionut84

unread,
Mar 19, 2012, 4:23:33 AM3/19/12
to Google Web Toolkit
You can use GWT Designer for building your application. After setting
it up you will not have any problems like you have now :).
Reply all
Reply to author
Forward
0 new messages