在Android应用程序中集成google place api

时间:2012-05-18 13:01:42

标签: android

我正在关注此链接

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',引用   来自方法hung.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();

1 个答案:

答案 0 :(得分:0)

在android清单文件中添加此行

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />