问题
I am trying to run this implementation of Google Place I downloaded from here link.
As you can see in the following image (not in its native size but i think it works nonetheless), I am getting an error (cannot be resolved) all across my imports. You can also tell from the image that I have the Google APIs Client Library for Java in place as well as the Maven plugin since the code author mentioned having used the library in this project.
I also have added the highlighted dependency to pom.xml as suggested in another thread when using the Maven plugin. Additionally I have tried running the project against multiple sdk versions (from 2.1 as told by the author up to 3.2).
What am i missing here? This is actually the first time I have to work with external libraries so I definitely have something mixed up here.
回答1:
There is special versions of sdk designed to use google api.
Use "Google API 3.2" instead of "Android 3.2" in your project properties > Android > Project Build Target
回答2:
import the com.google.api.client.* Jar file to your project.
来源:https://stackoverflow.com/questions/9802376/import-com-google-api-client-cannot-be-resolved