1

我正在关注这个链接

http://ddewaele.blogspot.in/2011/05/introducing-google-places-api.html

我下载了 google place api 的示例代码

https://github.com/tuthan/Google-Place-Api-Demo

当我运行项目并单击按钮时,它会强制关闭并在 logcat 处出错

com.google.api.client.http.apache.ApacheHttpTransport',引用自方法 hang.vo.PlaceRequest。

Could not find class 'hung.vo.PlaceRequest$1', referenced from method hung.vo.PlaceRequest.createRequestFactory

Could not find class 'com.google.api.client.http.GenericUrl', referenced from method hung.vo.PlaceRequest.performSearch

Caused by: java.lang.VerifyError: hung.vo.PlaceRequest hung.vo.hung.vo.GooglePlaceActivity$SearchSrv.doInBackground(GooglePlaceActivity.java:36)

在 GooglePlaceActivity 第 36 行是

pl = new PlaceRequest().performSearch();

4

1 回答 1

0

在 android manifest 文件中添加这一行

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 
于 2012-05-18T13:29:34.483 回答