为什么在 Eclipse 的 SDK 中选择 Android API 而不是 Google API?
当您在 Eclipse 中创建一个 android 项目时,您必须选择使用哪个平台进行编译.您可以选择 API 17 (Android 4.2) 或 Google API (API 17).
When you create an android project in Eclipse, you have to choose which platform to compile with. You can choose API 17 (Android 4.2) or Google APIs (API 17).
据我了解,Google API 是 API 17 (Android 4.2),但具有地图库支持和 USB 开放库.那么如果 Google API 和 Android 一样,但功能更多……为什么不每次都选择它呢?
From my understanding, Google APIs is API 17 (Android 4.2), but has the maps library support and usb open library. So if Google APIs is the same as Android, but with more features... why wouldn't you choose it everytime?
Google API 有缺点吗?我看到的每个在线教程,他们都使用 API 17(非 Google API).我一直很好奇为什么他们手动将其更改为那个,而不是只使用其中包含更多内容的那个.
Is there a downside to Google APIs? Every tutorial online I see, they use API 17 (Non Google APIs). I'm always curious as to why they manually change it to that instead of just using the one that has more in it.
推荐答案
当您使用 Google API 运行时,您的应用将构建为在已安装 Google 服务(地图、USB 等)的设备上运行.如果您绝对需要这些服务,则应针对 Google API 构建,但您的应用将无法在未经 Google 认证的设备上运行(即未安装 Google Play).
When you run with Google APIs, your app is built to run on a device which has the Google services installed on it already (Maps, USB etc). If you absolutely require these services, you should build against Google APIs, but then your app will not run on device which aren't certified by Google (that is, don't have Google Play installed).
如果您确实想在没有 Google Play 的设备上运行,并且您的应用不需要任何 Google 服务 100% 存在,那么您应该针对普通的 Android API 进行编译.
If you do want to run on device without Google Play, and your app does not require any of the Google Services to be 100% present, then you should compile against the normal Android APIs.
请参阅此文档了解更多关于 Google 对认证设备的期望.
See this document for a bit more on what Google expects from certified devices.
相关文章