Import com.google.api.client.* cannot be resolved

女生的网名这么多〃 提交于 2019-12-11 04:17:37

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!