我需要哪个Android平台的SDK?
我想测试并分发我的phonegap 应用程序。它已经在 iPhone 上运行。
一开始我安装了最新的 SDK (4.0.3),但这个不能在我的手机上运行。所以...我想我必须安装更多。
我需要在 Android SDK Manager 中安装什么?
所有 SDK?我还需要 Sample/Arm/GoogleAPI/Sources 吗?
I would like to test and distribute my phonegap app. It already runs for iPhone.
At first I installed the newest SDK (4.0.3) but this one does not run on my phone. So... i guess I have to install more.
What do I need to install in the Android SDK Manager?
All SDKs? Do I need the Sample/Arm/GoogleAPI/Sources too?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
一般来说,我会安装所有 SDK 版本,因为能够在各种模拟器上进行测试以确保您的应用程序适用于所有版本的 Android 是件好事。您应该始终使用最新的 SDK 构建应用程序,但在 AndroidManifest.xml 文件中,您应该将 android:minSdkVersion 设置为您希望应用程序运行的最低 Android 级别。目前我推荐 7 (Android 2.1),因为 97% 的手机运行 2.1 或更高版本。
Generally I install all the SDK versions as it is good to be able to test on the various emulators to make sure you app works in all versions of Android. You should always build your application with the latest SDK but in your AndroidManifest.xml file you should have a android:minSdkVersion set to the lowest Android level you want your app to run on. For now I recommend 7 (Android 2.1) as 97% of the phones are running 2.1 or above.
正如您在此处的平台版本图表中看到的,建议使用Android 2.1或2.2 SDK几乎涵盖了市场上所有的Android设备。
我认为您不需要 Sample/ARM/Sources,但如果您需要使用 Google 专有 API(例如 Google Maps API),则需要使用 Google API 版本 2.1 或 2.2。
As you can see in the platform versions chart here it is recommended to use Android 2.1 or 2.2 SDK to cover almost all the Android devices on the market.
I think you don't need Sample/ARM/Sources, though if you need to use Google proprietary API (for example Google Maps API) you need to use Google API versions of 2.1 or 2.2.
您只需要与您打算构建的 API 级别相匹配的 SDK。
此页面: http://developer.android.com/resources/dashboard/platform- versions.html
详细列出了当前使用最活跃的设备(两周内进入市场)
据此判断,如果您的目标是 2.1,则您的应用安装率将达到 98.3%所有此类设备。
通常最好选择支持您需要的所有功能的最旧的平台。只要保持在 1.6 或以上,即引入了对多种屏幕尺寸的支持。
You only need the SDK that matches the API level you intend to build for.
This page: http://developer.android.com/resources/dashboard/platform-versions.html
has a breakdown of what devices are most active in currrent use (accessed market within 2 weeks)
Judging by that, if you target 2.1 you'd be able to install your app on 98.3% of all such devices.
It is generally best to pick the oldest platform that supports all of the features you need. Just stay at or above 1.6, that is when support for multiple screen sizes was introduced.
我认为最好的解决方案是 SDK 2.2。许多设备都可以使用这个 Android 版本。
As I think, the best solution is SDK 2.2. Many devices work with this android version.
在您的 Android 手机上,转到设置 -> 关于手机并查看 Android 版本。这应该是您需要的 sdk。之后,您只需在应用程序中更改目标 android sdk 版本,它就应该在您的手机上运行。至于你所说的文件夹 - 它们包含一些示例、sdk 的源代码和一些使用谷歌服务的附加 api。是否需要它们取决于您。您肯定需要 Android SDK 管理器中的平台工具 - 它们为您提供了 adb 工具,使您能够将应用程序上传到您的设备。
On your Android phone go to settings->About Phone and view the Android version. This should be the sdk you will need. Afterwords, you can just change the target android sdk version in your app and it should run on your phone. As for the folders you speak of - they contain some examples, the source code of the sdk and some additional apis to use google services. It is up to you whether you will need them. You will definitely need the platform-tools from the Android SDK manager - they provide you with the adb tool that enables you to upload applications to your device.