cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam Wong (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (CB-9253) 'Error: Please install Android target: "android-22"' when building on Windows due to extra "\r" in sdk version string
Date Fri, 26 Jun 2015 04:46:04 GMT

     [ https://issues.apache.org/jira/browse/CB-9253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sam Wong closed CB-9253.
------------------------
    Resolution: Not A Problem

> 'Error: Please install Android target: "android-22"' when building on Windows due to
extra "\r" in 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 from 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"*
> Further 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/g,"");}}
>   



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message