Visual Studio 2015 RC及Cordova build.bat:“错误:请安装Android目标:"android-21"" [英] Visual Studio 2015 RC & Cordova build.bat: "Error: Please install Android target: "android-21""
本文介绍了Visual Studio 2015 RC及Cordova build.bat:“错误:请安装Android目标:"android-21""的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
环境
-
VS 14.0.22823.1 D14REL
VS 14.0.22823.1 D14REL
64位JDK,手动安装;不使用ADK随附的版本
64 bit JDK, manually installed; not using the one which comes with ADK
Windows 8.1
Windows 8.1
问题
- 创建"Appache Cordova Apps"类型的新项目,保留默认名称"BlankCordovApp3"
- 使用默认设置构建应用:可以正常运行
- 尝试使用
BlankCordovApp3 \ platforms \ android \ cordova \ build.bat
构建解决方案,以获取更多输出 - 错误:请安装Android目标:"android-21".提示:通过运行以下命令打开SDK管理器:...您将需要:
- Create new Project of type "Appache Cordova Apps", leave default name "BlankCordovApp3"
- Build the app with default settings: Works fine
- Try to build the solution with
BlankCordovApp3\platforms\android\cordova\build.bat
in order to get more output - Error: Please install Android target: "android-21". Hint: Open the SDK manager by running: ... You will require:
- 适用于android-21的"SDK平台"
- "Android SDK平台工具(最新)
- "Android SDK构建工具"(最新)][错误:请安装Android目标:"android-21".提示:通过运行以下命令打开SDK管理器:...您将需要:
- 适用于android-21的"SDK平台"
- "Android SDK平台工具(最新)
- "Android SDK构建工具"(最新)]
推荐答案
解决方案
- 这不是已安装的ADK级别的问题.即使通过Android SDK管理器安装了正确的工具,问题仍然存在.
-
对于我来说,该问题是通过将adk工具添加到路径(控制面板=>环境变量")来解决的.
- It is not a problem of the installed ADK levels.The problem persists even if the correct tools are installed through the Android SDK manager.
In my case, the problem was solved by adding the adk tools to the path (Control Panel => Environment Variables).
C:\Users\userName\AppData\Local\Android\android-sdk\tools;C:\Users\userName\AppData\Local\Android\android-sdk\platform-tools;
这篇关于Visual Studio 2015 RC及Cordova build.bat:“错误:请安装Android目标:"android-21""的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文