문제

The code was working fine before adding action bar in project. The added library is **appcompat_v7**. After adding action bar the following problems occurred

Code:

private static final HttpTransport HTTP_TRANSPORT = new NetHttpTransport();

Error:
NetHttpTransport cannot be resolved to a type.
HttpTransport cannot be resolved to a type

Code:

@Key
public String id;

Error: Key cannot be resolved to a type

I think the error happened because the imports are not working. The imports are

com.google.api.client.googleapis.GoogleHeaders;
com.google.api.client.http.GenericUrl;
com.google.api.client.http.HttpRequest;
com.google.api.client.http.HttpRequestFactory;
com.google.api.client.http.HttpRequestInitializer;
com.google.api.client.http.HttpTransport;
com.google.api.client.http.javanet.NetHttpTransport;
com.google.api.client.http.json.JsonHttpParser;
com.google.api.client.json.jackson.JacksonFactory;

com.google.api.client.util.Key;
도움이 되었습니까?

해결책 2

Adding httpclient-4.0.2-sources.jar and jar for google places api can solve the problem

다른 팁

Please check your Android SDK Tools and Android SDK Platform-tools. And upgarde to Android SDK Tools Rev. 22.3 and Android SDK Platform-tools to 19 if not available.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top