You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Benn Mapes (JIRA)" <ji...@apache.org> on 2013/04/05 21:55:16 UTC

[jira] [Commented] (CB-2910) Create Script is incorrect, and creates issues when creating new app

    [ https://issues.apache.org/jira/browse/CB-2910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13624002#comment-13624002 ] 

Benn Mapes commented on CB-2910:
--------------------------------

Line 93:
ANDROID_BIN="${ANDROID_BIN:=$( which android )}"

For me if I type "which android" into my terminal I get "/someDir/android-sdk-macosx/tools/android"

"which android" should resolve to the right path. Can you confirm this? or are you getting a different result?

                
> Create Script is incorrect, and creates issues when creating new app
> --------------------------------------------------------------------
>
>                 Key: CB-2910
>                 URL: https://issues.apache.org/jira/browse/CB-2910
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.5.0
>         Environment: Linux
>            Reporter: Thomas Holmes Jr.
>            Assignee: Benn Mapes
>              Labels: android, create, script
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> When creating a new app for Android, lines 98 and 99 are as follows:
> TARGET=$("$ANDROID_BIN" list targets | grep id: | tail -1 | cut -f 2 -d ' ' )
> API_LEVEL=$("$ANDROID_BIN" list target | grep "API level:" | tail -n 1 | cut -f 2 -d ':' | tr -d ' ')
> The "Getting Started" Guide says we should create a path to "/somedirectory/android_sdk/tools" and "/somedirectory/android_sdk/platform-tools"
> However, we get an error that shows that "/somedirectory/android_sdk/tools" is a directory.
> Lines 98 and 99, and perhaps others that use "$ANDROID_BIN" should actually be "$ANDROID_BIN"/android to run the actual "android" tool.
> Since  "$ANDROID_BIN" list target          translates to:  /somedirectory/android_sdk/tools list target     and will not run.
> But    "$ANDROID_BIN"/android list target  translates to:  /somedirectory/android_sdk/tools/android list target     and WILL run.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira