我正在尝试将 android平台添加到我的cordova项目中 cordova platform add android 但是,我收到以下错误: Error: Please install Android target 19 (the Android newest SDK). Make sure you have thelatest Android tools instal
cordova platform add android
但是,我收到以下错误:
Error: Please install Android target 19 (the Android newest SDK). Make sure you have the latest Android tools installed as well. Run "android" from your command-line to install/update any missing SDKs or tools.
正如消息所示,我使用android命令安装所有更新.除此之外,我还在路径变量中添加了以下内容:
%ANT_HOME%\bin;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools;%JAVA_HOME%\bin
我在网上找到的类似问题的其他回答建议将project.properties文件中的目标变量设置为
target=android-19
我在过去几天尝试了所有这些,但我无法解决这个错误.我还能尝试解决这个问题吗?顺便说一下,我正在运行Windows 8.1 64位.
编辑:
我只想在运行时添加更多信息
android list target
我得到以下输出
Available Android targets id: 1 or "android-19" Name: Android 4.4.2 Type: Platform API level: 19 Revision: 3 Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in Tag/ABIs : default/armeabi-v7a, default/x86 id: 2 or "Google Inc.:Google APIs x86:19" Name: Google APIs x86 Type: Add-On Vendor: Google Inc. Revision: 4 Description: Android + Google APIs x86 Based on Android 4.4.2 (API level 19) Libraries: * com.android.future.usb.accessory (usb.jar) API for USB Accessories * com.google.android.media.effects (effects.jar) Collection of video effects * com.google.android.maps (maps.jar) API for Google Maps Skins: WVGA800 (default), WVGA854, WSVGA, WXGA720, HVGA, WXGA800-7in, QVGA, WQVGA400, WQVGA432, WXGA800 Tag/ABIs : default/x86 id: 3 or "Google Inc.:Google APIs:19" Name: Google APIs Type: Add-On Vendor: Google Inc. Revision: 4 Description: Android + Google APIs Based on Android 4.4.2 (API level 19) Libraries: * com.android.future.usb.accessory (usb.jar) API for USB Accessories * com.google.android.media.effects (effects.jar) Collection of video effects * com.google.android.maps (maps.jar) API for Google Maps Skins: WVGA800 (default), WVGA854, WSVGA, WXGA720, HVGA, WXGA800-7in, QVGA, WQVGA400, WQVGA432, WXGA800 Tag/ABIs : default/armeabi-v7a我遇到了同样的问题.我通过下载相应的来源以及目标[Android L,Android 4.4W(API 20)和Android 4.4.2w(API 19)]解决了这个问题
android list target
输出:
Available Android targets: ---------- id: 1 or "android-19" Name: Android 4.4.2 Type: Platform API level: 19 Revision: 3 Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in Tag/ABIs : default/armeabi-v7a, default/x86 ---------- id: 2 or "android-20" Name: Android 4.4W Type: Platform API level: 20 Revision: 1 Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in, AndroidWearRound, AndroidWearSquare, AndroidWearRound, AndroidWearSquare Tag/ABIs : android-wear/armeabi-v7a, android-wear/x86 ---------- id: 3 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 : android-tv/armeabi-v7a, android-tv/x86, default/armeabi-v7a, default/x86 ---------- id: 4 or "Google Inc.:Glass Development Kit Preview:19" Name: Glass Development Kit Preview Type: Add-On Vendor: Google Inc. Revision: 8 Description: Preview of the Glass Development Kit Based on Android 4.4.2 (API level 19) Libraries: * com.google.android.glass (gdk.jar) APIs for Glass Development Kit Preview Skins: WXGA800, WXGA800-7in, HVGA, WVGA800 (default), WQVGA400, QVGA, WSVGA, WQVGA432, WXGA720, WVGA854 Tag/ABIs : no ABIs. ---------- id: 5 or "Google Inc.:Google APIs:19" Name: Google APIs Type: Add-On Vendor: Google Inc. Revision: 6 Description: Android + Google APIs Based on Android 4.4.2 (API level 19) Libraries: * com.google.android.media.effects (effects.jar) Collection of video effects * com.android.future.usb.accessory (usb.jar) API for USB Accessories * com.google.android.maps (maps.jar) API for Google Maps Skins: WXGA800, WXGA800-7in, HVGA, WVGA800 (default), WQVGA400, QVGA, WSVGA, WQVGA432, WXGA720, WVGA854 Tag/ABIs : default/armeabi-v7a ---------- id: 6 or "Google Inc.:Google APIs (x86 System Image):19" Name: Google APIs (x86 System Image) Type: Add-On Vendor: Google Inc. Revision: 6 Description: Android x86 + Google APIs Based on Android 4.4.2 (API level 19) Libraries: * com.google.android.media.effects (effects.jar) Collection of video effects * com.android.future.usb.accessory (usb.jar) API for USB Accessories * com.google.android.maps (maps.jar) API for Google Maps Skins: WXGA800, WXGA800-7in, HVGA, WVGA800 (default), WQVGA400, QVGA, WSVGA, WQVGA432, WXGA720, WVGA854 Tag/ABIs : default/x86