问题
Environment
VS 14.0.22823.1 D14REL
64 bit JDK, manually installed; not using the one which comes with ADK
Windows 8.1
Problem
- 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:
- "SDK Platform" for android-21
- "Android SDK Platform-tools (latest)
- "Android SDK Build-tools" (latest)]` [Error: Please install Android target: "android-21". Hint: Open the SDK manager by running: ... You will require:
- "SDK Platform" for android-21
- "Android SDK Platform-tools (latest)
- "Android SDK Build-tools" (latest)]
回答1:
Solution
- 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;
来源:https://stackoverflow.com/questions/30829205/visual-studio-2015-rc-cordova-build-bat-error-please-install-android-target