简体   繁体   English

Android Studio在多个SDK版本之间切换

[英]android studio switch between multiple sdk version

If I install multiple SDK version, how can I switch it between it to use new API or old API? 如果安装了多个SDK版本,如何在它之间切换以使用新API还是旧API?

eg My android list target output as below: 例如我的android列表目标输出如下:

Available Android targets:
----------
id: 1 or "android-19"
     Name: Android 4.4.2
     Type: Platform
     API level: 19
     Revision: 2
     Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in
 Tag/ABIs : default/armeabi-v7a
----------
id: 2 or "android-L"
     Name: Android L (Preview)
     Type: Platform
     API level: L
     Revision: 3
     Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in
 Tag/ABIs : no ABIs.

But when I try to create a L android application, it seems I still no see the new API for L. 但是,当我尝试创建L android应用程序时,似乎仍然看不到L的新API。

I you want to target other versions, then you must install different "System Images" 我要定位其他版本,则必须安装其他“系统映像”

系统映像已检查

Then when you wish to create an AVD under "Target" there will be an extra option to target those versions. 然后,当您希望在“目标”下创建AVD时,将有一个额外的选项可以将这些版本作为目标。

This is only for AVDs(Virtual Devices) if you wish to code for older versions you will need to use support libraries 这仅适用于AVD(虚拟设备),如果您希望为旧版本编码,则需要使用支持库

don't use the Android L preview .. you will get some bugs 不要使用Android L预览..您会遇到一些错误

just use either Android 4.4W API20 or Android 4.4.2 API 19 只需使用Android 4.4W API20或Android 4.4.2 API 19

if you can't see one of both I suggest you to install a new version of android SDK Manger 如果您看不到两者之一,建议您安装新版本的android SDK manger

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM