我正在开发一个 GWT 应用程序来从 Freebase 获取查询结果。这是我的 EntryPoint 类的代码。
package com.google.tracker.client;
import com.freebase.api.Freebase;
import com.freebase.json.JSON;
import com.google.gwt.core.client.EntryPoint;
public class Tracker implements EntryPoint{
public void onModuleLoad() {
Freebase freebase = Freebase.getFreebase();
String query_str = "{" +
"'id': null," +
"'type': '/film/film'," +
"'name': 'Blade Runner'," +
"'directed_by': [{" +
"'id': null," +
"'name': null" +
"}]" +
"}".replace('\'', '"');
JSON query = new JSON(query_str);
JSON result = freebase.mqlread(query);
@SuppressWarnings("unused")
String director = result.get("result").get("directed_by").get(0).get("name").string();
}
}
我收到以下错误:
[ERROR] Line 10: No source code is available for type com.freebase.api.Freebase; did you forget to inherit a required module?
[ERROR] Line 21: No source code is available for type com.freebase.json.JSON; did you forget to inherit a required module?
这些可能的原因是什么?