Adding httpclient-4.0.2-sources.jar and jar for google places api can solve the problem
Getting Errors on the working code after adding appcompat_v7 library
-
30-06-2023 - |
Question
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;
La solution 2
Autres conseils
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.
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow