Titanium Mobile
  1. Titanium Mobile
  2. TIMOB-11781

CLI: titanium build for android cannot detect the Android SDK targets even when they are available

    Details

      Description

      Steps to Reproduce:
      1. Create an application
      2. Run "titanium build"
      3. type "android"

      Actual:
      [ERROR] Unable to detect Android SDK targets.

      Please download SDK targets via Android SDK Manager and try again. (version 2.2 or newer)

      Expected:
      To build the android application

        Activity

        Show
        Chris Barber added a comment - Master pull request: https://github.com/appcelerator/titanium_mobile/pull/3462 3.0.x pull request: https://github.com/appcelerator/titanium_mobile/pull/3463
        Hide
        Natalie Huynh added a comment -

        Tested with CLI 3.0.19

        Show
        Natalie Huynh added a comment - Tested with CLI 3.0.19
        Hide
        Mukul Sharma added a comment -

        Still seeing this issue on CLI 3.0.22. Not sure how to re-open this case. Can someone do that for me?

        Show
        Mukul Sharma added a comment - Still seeing this issue on CLI 3.0.22. Not sure how to re-open this case. Can someone do that for me?
        Hide
        Jon Ege Ronnenberg added a comment -

        Same issue with ti -v 3.0.24
        Is there a work-around?

        Show
        Jon Ege Ronnenberg added a comment - Same issue with ti -v 3.0.24 Is there a work-around?
        Hide
        Jon Ege Ronnenberg added a comment -

        I should mention that my path is: android.sdkPath = "/Volumes/Macintosh HD 2 1/dotnetCarpenter/src/android-sdk-macosx/"

        Do you think this could be fixed in time for TiConf EU? - it's on Saturday the 23th.

        Show
        Jon Ege Ronnenberg added a comment - I should mention that my path is: android.sdkPath = "/Volumes/Macintosh HD 2 1/dotnetCarpenter/src/android-sdk-macosx/" Do you think this could be fixed in time for TiConf EU? - it's on Saturday the 23th.
        Hide
        Mukul Sharma added a comment -

        Jon, you can run the Titanium Setup by running the command - ti setup
        Going through the setup successfully will fix this problem.

        Show
        Mukul Sharma added a comment - Jon, you can run the Titanium Setup by running the command - ti setup Going through the setup successfully will fix this problem.
        Hide
        Jon Ege Ronnenberg added a comment -

        Thanks for the swift reply! It still doesn't work though. Below I have inserted the output from running ti setup & ti build. I think it's a path issue but I could be wrong.

        When I run ti setup I get the following:
        titanium setup
        Titanium Command-Line Interface, CLI version 3.0.24, Titanium SDK version 3.0.0.GA
        Copyright (c) 2012-2013, Appcelerator, Inc. All Rights Reserved.

        Please report bugs to http://jira.appcelerator.org/

        Enter ctrl-c at any time to quit

        What is your name? (this is used as the default for the "author" field in the tiapp.xml or module manifest file when creating new projects) (dotnetCarpenter)
        What is your email address used for logging into the Appcelerator Network? (jon.ronnenberg@gmail.com)
        What would you like as your default locale? (examples: "en", "de", "fr") (en)
        What Titanium SDK would you like to use by default? (3.0.0.GA) 3.0.2.GA
        Path to your workspace where your projects should be created: (/Volumes/Macintosh HD 2 1/dotnetCarpenter/Projects/server/cloud9/workspace/)
        Path to the Android SDK: (this is needed for building Android apps) (/Volumes/Macintosh HD 2 1/dotnetCarpenter/src/android-sdk-macosx/)

        Configuration saved

        But still, when I run ti build I get:
        ti build
        Titanium Command-Line Interface, CLI version 3.0.24, Titanium SDK version 3.0.2.GA
        Copyright (c) 2012-2013, Appcelerator, Inc. All Rights Reserved.
        Please report bugs to http://jira.appcelerator.org/
        Target platform [android,ios,mobileweb]: android
        [INFO] :   tiapp.xml <sdk-version> set to 3.0.0.GA, but current Titanium SDK set to 3.0.2
        [INFO] :   Forking correct SDK command: node /usr/local/share/npm/bin/ti build --sdk 3.0.0.GA --platform android --project-dir /Volumes/Macintosh HD 2 1/dotnetCarpenter/Projects/server/cloud9/workspace/TiShadowApp --log-level info --android-sdk /Volumes/Macintosh HD 2 1/dotnetCarpenter/src/android-sdk-macosx --avd-id 7 --avd-skin HVGA --target emulator
        [ERROR] :  Unable to detect Android SDK targets.
        Please download SDK targets via Android SDK Manager and try again. (version 2.2 or newer)

        Show
        Jon Ege Ronnenberg added a comment - Thanks for the swift reply! It still doesn't work though. Below I have inserted the output from running ti setup & ti build. I think it's a path issue but I could be wrong. When I run ti setup I get the following: titanium setup Titanium Command-Line Interface, CLI version 3.0.24, Titanium SDK version 3.0.0.GA Copyright (c) 2012-2013, Appcelerator, Inc. All Rights Reserved. Please report bugs to http://jira.appcelerator.org/ Enter ctrl-c at any time to quit What is your name? (this is used as the default for the "author" field in the tiapp.xml or module manifest file when creating new projects) (dotnetCarpenter) What is your email address used for logging into the Appcelerator Network? (jon.ronnenberg@gmail.com) What would you like as your default locale? (examples: "en", "de", "fr") (en) What Titanium SDK would you like to use by default? (3.0.0.GA) 3.0.2.GA Path to your workspace where your projects should be created: (/Volumes/Macintosh HD 2 1/dotnetCarpenter/Projects/server/cloud9/workspace/) Path to the Android SDK: (this is needed for building Android apps) (/Volumes/Macintosh HD 2 1/dotnetCarpenter/src/android-sdk-macosx/) Configuration saved But still, when I run ti build I get: ti build Titanium Command-Line Interface, CLI version 3.0.24, Titanium SDK version 3.0.2.GA Copyright (c) 2012-2013, Appcelerator, Inc. All Rights Reserved. Please report bugs to http://jira.appcelerator.org/ Target platform [android,ios,mobileweb] : android [INFO] :   tiapp.xml <sdk-version> set to 3.0.0.GA, but current Titanium SDK set to 3.0.2 [INFO] :   Forking correct SDK command: node /usr/local/share/npm/bin/ti build --sdk 3.0.0.GA --platform android --project-dir /Volumes/Macintosh HD 2 1/dotnetCarpenter/Projects/server/cloud9/workspace/TiShadowApp --log-level info --android-sdk /Volumes/Macintosh HD 2 1/dotnetCarpenter/src/android-sdk-macosx --avd-id 7 --avd-skin HVGA --target emulator [ERROR] :  Unable to detect Android SDK targets. Please download SDK targets via Android SDK Manager and try again. (version 2.2 or newer)
        Hide
        Jon Ege Ronnenberg added a comment -

        I just symlinked (``ln -s``) my android-sdk-macosx/ folder to /Applications as suggested by your [wiki](https://wiki.appcelerator.org/display/guides/Configuring+Environment+Variables#ConfiguringEnvironmentVariables-OSX]) and now ``ti build``doesn't complain about missing android SDK.

        You should probably do something like
        ```javascript
        var s = "/Volumes/Macintosh HD 2 1/dotnetCarpenter/Library/Application Support/Titanium/mobilesdk/osx/3.0.0.GA/android/builder.py";
        s = s.replace(/\s/g, "
        ");
        console.log(s)
        ```

        Show
        Jon Ege Ronnenberg added a comment - I just symlinked (``ln -s``) my android-sdk-macosx/ folder to /Applications as suggested by your [wiki] ( https://wiki.appcelerator.org/display/guides/Configuring+Environment+Variables#ConfiguringEnvironmentVariables-OSX ]) and now ``ti build``doesn't complain about missing android SDK. You should probably do something like ```javascript var s = "/Volumes/Macintosh HD 2 1/dotnetCarpenter/Library/Application Support/Titanium/mobilesdk/osx/3.0.0.GA/android/builder.py"; s = s.replace(/\s/g, " "); console.log(s) ```

          People

          • Assignee:
            Chris Barber
            Reporter:
            Natalie Huynh
          • Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: