Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5FA0F18E94 for ; Thu, 25 Jun 2015 22:44:05 +0000 (UTC) Received: (qmail 46152 invoked by uid 500); 25 Jun 2015 22:44:05 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 46125 invoked by uid 500); 25 Jun 2015 22:44:05 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 45998 invoked by uid 99); 25 Jun 2015 22:44:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jun 2015 22:44:05 +0000 Date: Thu, 25 Jun 2015 22:44:05 +0000 (UTC) From: "Sam Wong (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CB-9253) 'Error: Please install Android target: "android-22"' when building on Windows due to extra "\r" in sdk version string MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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" in 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" 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 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: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org