包com.google.android.maps不存在(的IntelliJ)不存在、google、com、android

2023-09-05 08:37:01 作者:世界很宽,孤独很满

我用Google地图API之前很多次,没有这个问题,但我已经清楚地做了一些不对的的IntelliJ项目。在设置 - >软件开发工具包我已指定在classpath平台7谷歌API - 它仍然无法建立并称地图API不存在。我也尝试添加一个单独的参考到类路径到谷歌的API的.jar,但仍是同样的问题。

I've used the Maps APIs many times before and not had this problem, but I've clearly done something wrong with this IntelliJ project. Under Settings->SDKs I have specified the platform 7 Google API in the classpath - it still fails to build saying the Maps APIs are not there. I have also tried added a separate reference to the classpath to the Google APIs .jar, but still the same problem.

我如何解决我的IntelliJ IDE项目,因此正确地建立针对谷歌的API?

How do I fix my IntelliJ IDE project so it correctly builds against the Google APIs?

这是一个漫长的一天,我可能失去了一些东西明显。

It's been a long day, I am probably missing something obvious.

推荐答案

对不起,意识到我做了什么错后再次回答我的问题。因此,要获得谷歌(地图等)中的API的IntelliJ工作:

Sorry, answering my own question again after realising what I've done wrong. So to get the Google (Maps etc) APIs working in IntelliJ:

在设置 - >项目结构 - >软件开发工具包为您针对性的平台级增加一个项目。在Classpath选项卡中添加一个引用到Android的SDK文件夹的顶部,并使用构建目标菜单指定目标哪个平台。 在设置 - >项目结构 - >模块 - >相关性选择模块SDK列表中的SDK版本 如果您需要针对谷歌(地图等),然后在设置 - 原料药>项目结构 - > SDKs->类路径请确保您还添加引用.jar文件对谷歌的API的平台版本(例如插件/addon_google_apis_google_inc_8/libs/maps.jar
 
精彩推荐
图片推荐