Android Google API:createRequestFactory抛出未找到类的运行时错误

Android Google API:createRequestFactory抛出未找到类的运行时错误,android,google-api-java-client,Android,Google Api Java Client,我正在尝试使用谷歌地图API来制作姜饼 这就是我得到的 进口: import com.google.api.client.http.GenericUrl; import com.google.api.client.http.HttpHeaders; import com.google.api.client.http.HttpRequest; import com.google.api.client.http.HttpRequestFactory; import com.google.api.cl

我正在尝试使用谷歌地图API来制作姜饼

这就是我得到的

进口:

import com.google.api.client.http.GenericUrl;
import com.google.api.client.http.HttpHeaders;
import com.google.api.client.http.HttpRequest;
import com.google.api.client.http.HttpRequestFactory;
import com.google.api.client.http.HttpRequestInitializer;
import com.google.api.client.http.HttpTransport;
import com.google.api.client.http.javanet.NetHttpTransport;
//import com.google.api.client.http.json.JsonHttpParser;
import com.google.api.client.json.JsonObjectParser;
import com.google.api.client.json.jackson.JacksonFactory;
函数调用

HttpTransport HTTP_TRANSPORT = new NetHttpTransport();
HttpRequestFactory httpRequestFactory = createRequestFactory(HTTP_TRANSPORT);
函数定义

public static HttpRequestFactory createRequestFactory(
        final HttpTransport httpTransport) {
    Log.d("Test Debug","Issue above");
    return httpTransport.createRequestFactory(new HttpRequestInitializer() {
        public void initialize(HttpRequest request) {
            HttpHeaders headers = new HttpHeaders();
            headers.setUserAgent("ZT-LocationSearch-Test");
            request.setHeaders(headers);
            JsonObjectParser parser = new JsonObjectParser(new JacksonFactory());
            request.setParser(parser);
        }
    });
}
问题是,我的应用程序在此呼叫时意外关闭,LogCat显示以下错误:

    07-28 11:03:34.679: W/dalvikvm(24879): VFY: unable to find class referenced in signature (Lcom/google/api/client/http/HttpTransport;)
07-28 11:03:34.699: W/dalvikvm(24879): Link of class 'Lcom/zt/location/GooglePlaces$1;' failed
07-28 11:03:34.709: E/dalvikvm(24879): Could not find class 'com.zt.location.GooglePlaces$1', referenced from method com.zt.location.GooglePlaces.createRequestFactory
07-28 11:03:34.719: W/dalvikvm(24879): VFY: unable to resolve new-instance 1209 (Lcom/zt/location/GooglePlaces$1;) in Lcom/zt/location/GooglePlaces;
07-28 11:03:34.719: E/dalvikvm(24879): Could not find class 'com.google.api.client.http.javanet.NetHttpTransport', referenced from method com.zt.location.GooglePlaces.getPlaceDetails
07-28 11:03:34.729: W/dalvikvm(24879): VFY: unable to resolve new-instance 1194 (Lcom/google/api/client/http/javanet/NetHttpTransport;) in Lcom/zt/location/GooglePlaces;
07-28 11:03:34.739: E/dalvikvm(24879): Could not find class 'com.google.api.client.http.javanet.NetHttpTransport', referenced from method com.zt.location.GooglePlaces.search
07-28 11:03:34.749: W/dalvikvm(24879): VFY: unable to resolve new-instance 1194 (Lcom/google/api/client/http/javanet/NetHttpTransport;) in Lcom/zt/location/GooglePlaces;
07-28 11:03:34.839: W/dalvikvm(24879): threadid=9: thread exiting with uncaught exception (group=0x40018578)
任何帮助/解决方法都会很好

谢谢

编辑:

我正在尝试获取GooglePlaces并解析json响应以显示。我有没有办法打电话给你

https://maps.googleapis.com/maps/api/place/search/json?

这可能是一个不兼容的版本问题吗?我正在姜饼耳机上使用谷歌API 1.15.0-rc。我尝试了10多个小时,但找不到任何解决方案。所有的解决方案都建议使用相同的代码,但这些代码对我不起作用。我可以尝试任何补丁/解决方法吗?你有没有尝试在更新版本的Android上运行此代码?没有。我只能访问我的姜饼。我应该如何创建此http请求以使其在2.3.3中工作?我只需要从GoogleAPI中检索JSON进行进一步的解析,这必须在gingerbread中以某种方式进行处理。