GWT 응용 프로그램을 개발하여 Freebase에서 쿼리 결과를 가져옵니다. 이것은 내 EntryPoint 클래스의 코드입니다. 이들에 대한Java에서 Freebase API 사용
[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?
무엇을 할 수있는 가능한 이유 :
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();
}
}
나는 다음과 같은 오류가 무엇입니까?
Google에이 코드를 작성하지 않는 한 코드에 com.google 네임 스페이스를 사용하지 않아야합니다. –