【问题标题】:API 17: Android 4.2 vs Google APIs (Google inc.) (API 17) when creating new app [duplicate]API 17:创建新应用时的 Android 4.2 与 Google API(Google Inc.)(API 17)[重复]
【发布时间】:2013-08-10 04:50:26
【问题描述】:

使用 Android Studio(或带有 ADT 插件的 Eclipse),在创建新项目(不是 AVD)时,“编译方式”选项之间有什么区别,例如, API 17: Android 4.2 (Jelly Bean)Google APIs (Google Inc.) (API 17)?

我在创建 AVD 时知道两者之间的区别,但只是想知道在创建基础 Android 应用项目时有什么区别。

显然我知道不同 API 编号之间的区别,但只是想知道在创建新项目时有什么区别。

谢谢。

【问题讨论】:

  • 有时当您使用带有库的项目(需要 Google API)时,您应该使用 Google API (Google Inc.) (API 17)
  • 我知道使用 Google API 创建 AVD 允许使用 Maps 和 Play Licensing 等功能,但不知道在创建新项目时它做了什么而不是 AVD。

标签: android


【解决方案1】:

Google API 包含 Google 特定的库。

  • API 17:Android 4.2(果冻豆)只有用于果冻豆的安卓 API

  • Google APIs(Google Inc.)(API 17)有 API 17:Android 4.2 + Google API's 也兼容 android 4.2

Google 为各种目的提供 API,例如用于显示 Google Map 的 Google Map API,在 Android 应用程序中使用 GCM。等等

如果您想在应用中使用任何此类 Google 功能,您需要 将 Google API 与普通的 android API 一起导入。通过选择 Google APIs(API 17) 你导入兼容安卓的谷歌库 4.2

查看一些 google API 的 here

【讨论】:

  • 我没有意识到您必须将项目基于 Google API;我原以为您可以像其他任何库一样将它们包含在您的代码中。
【解决方案2】:

我认为最大的区别在于 GoogleAPI 附带了您可能需要的所有常见 Google 库。例如 GooglePlayServices 等。

【讨论】:

  • 所以如果你的应用使用谷歌地图,你不应该再链接 google_play_services 项目了吗?
猜你喜欢
  • 2014-05-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-08-08
相关资源
最近更新 更多