[英]unable to import libraries in eclipse for google places api project
I am developing an application where i need to find nearest petrol stations using google places api. 我正在开发一个应用程序,我需要使用谷歌地方api找到最近的加油站。 But the problem is i am unable to import the libraries.
但问题是我无法导入库。 here are the lines where i am getting errors.
这是我遇到错误的行。
import com.google.api.client.googleapis.GoogleHeaders;
import com.google.api.client.http.GenericUrl;
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.HttpResponseException;
import com.google.api.client.http.HttpTransport;
import com.google.api.client.http.apache.ApacheHttpTransport;
import com.google.api.client.http.json.JsonHttpParser;
import com.google.api.client.json.jackson.JacksonFactory;
下载Google API Client Library for Java,通过Add Jar或Add External Jar 将其添加到Android应用程序的构建路径中 。
Android Application -> Properties -> Java Build Path -> Libraries -> Add jars.. or Add External Jars..
try this... 尝试这个...
Android Application -> Properties -> Android ->select Google APIS(2.2 or any)-> Apply-> ok.
Then Right Click on your project -> Refresh.
i am not sure ,but i think it shoud work. 我不确定,但我觉得它很有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.