[
https://issues.apache.org/jira/browse/CB-9253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sam Wong updated CB-9253:
-------------------------
Summary: 'Error: Please install Android target: "android-22"' when building
on Windows due to extra "\r" sdk version string (was: Error: Please install
Android target: "android-22" when building on Windows due to extra "\r" sdk
version string)
> 'Error: Please install Android target: "android-22"' when building on Windows
> due to extra "\r" sdk version string
> ------------------------------------------------------------------------------------------------------------------
>
> Key: CB-9253
> URL: https://issues.apache.org/jira/browse/CB-9253
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android
> Environment: Windows, Android
> Reporter: Sam Wong
>
> Trying to build a sample project for android on Windows 7. All of the
> android sdk pre-req has been installed. However, the build command: "cordova
> build" fails with
> Error: Please install Android target: "android-22"
> Furthur debug shows lib/check_reqs.js has a bug. In the
> "check_android_target()" function, it tries to match the android sdk string
> with "android list targets --compact". On Windows, the output contain
> "\r\n". output.split('\n') does not remove '\r' from the string. Hence,
> "android-22\r" != "android-22" and an error is throw.
> One workaround is to remove "\r" from the output string before matching.
> i.e. output=output.replace("\r","");
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]