Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24555] Android: Latest Android Tools breaks development with Titanium

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2017-04-10T23:26:25.000+0000
Affected Version/sRelease 6.0.3
Fix Version/sRelease 6.0.4
ComponentsAndroid
Labelsandroid, build-tools
ReporterHans Knöchel
AssigneeChris Barber
Created2017-04-04T05:12:01.000+0000
Updated2017-04-21T17:54:49.000+0000

Description

The latest Android tooling seems to break the usage with Titanium, because the <android-sdk>/tools/android command is deprecated in favor of the one embedded in Android Studio. This issue was raised by the community, here are some more details: {quote} I have just updated my Android Studio installation with the latest android tools and now Ti doesn’t recognize the Android sdk anymore on ti info, the platforms list is always empty. This is likely because /tools/android is deprecated and Google now uses the sdkmanager binary to handle sdk versions. It is really annoying having to maintain 2 separate android sdks on the same machine as it consumes an awful lot of space. {quote} Further references: * https://code.google.com/p/android/issues/detail?id=235455 * http://tools.android.com/recent/androidsdktoolsrevision2530feb2017 * https://developer.android.com/studio/tools/help/android.html

Attachments

FileDateSize
sdkmanager.jpg2017-04-04T12:09:10.000+000072614

Comments

  1. Gary Mathews 2017-04-04

    Currently, 25.2.3 is the latest command-line tools available to download from https://developer.android.com/studio/index.html However, https://developer.android.com/studio/releases/sdk-tools.html shows 26.0.1 is available, which is only available as a preview. !sdkmanager.jpg|thumbnail! *SDK Manager* https://developer.android.com/studio/command-line/sdkmanager.html
  2. Hans Knöchel 2017-04-04

    They recommend the sdkmanager and avdmanager for 25.2.3 and later. Some usage details: *SDK-Manager options*:
         sdkmanager [--uninstall] [<common args>] [--package_file <file>] [<packages>...]
         sdkmanager --update [<common args>]
         sdkmanager --list [<common args>]
         sdkmanager --licenses [<common args>]
       
       In its first form, installs, or uninstalls, or updates packages.
           By default, the listed packages are installed or (if already installed)
           updated to the latest version.
       
           --uninstall: uninstalled listed packages.
       
           <package> is a sdk-style path (e.g. "build-tools;23.0.0" or
                    "platforms;android-23").
           <package-file> is a text file where each line is a sdk-style path
                          of a package to install or uninstall.
           Multiple --package_file arguments may be specified in combination
           with explicit paths.
       
       In its second form (with --update), all installed packages are
           updated to the latest version.
       
       In its third form, all installed and available packages are printed
           out.
       
       In its fourth form (with --licenses), show and offer the option to
            accept licenses for all available packages that have not already been
            accepted.
       
       Common Arguments:
           --sdk_root=<sdkRootPath>: Use the specified SDK root instead of the SDK 
                                     containing this tool
       
           --channel=<channelId>: Include packages in channels up to <channelId>.
                                  Common channels are:
                                  0 (Stable), 1 (Beta), 2 (Dev), and 3 (Canary).
       
           --include_obsolete: With --list, show obsolete packages in the
                               package listing. With --update, update obsolete
                               packages as well as non-obsolete.
       
           --no_https: Force all connections to use http rather than https.
       
           --proxy=<http | socks>: Connect via a proxy of the given type.
       
           --proxy_host=<IP or DNS address>: IP or DNS address of the proxy to use.
       
           --proxy_port=<port #>: Proxy port to connect to.
       
       * If the env var REPO_OS_OVERRIDE is set to "windows",
         "macosx", or "linux", packages will be downloaded for that OS.
       
    *AVD-Manager options*:
       Usage:
             avdmanager [global options] [action] [action options]
             Global options:
         -s --silent     : Silent mode, shows errors only.
         -v --verbose    : Verbose mode, shows errors, warnings and all messages.
            --clear-cache: Clear the SDK Manager repository manifest cache.
         -h --help       : Help on a specific command.
       
       Valid actions are composed of a verb and an optional direct object:
       -   list              : Lists existing targets or virtual devices.
       -   list avd          : Lists existing Android Virtual Devices.
       -   list target       : Lists existing targets.
       -   list device       : Lists existing devices.
       - create avd          : Creates a new Android Virtual Device.
       -   move avd          : Moves or renames an Android Virtual Device.
       - delete avd          : Deletes an Android Virtual Device.
       
    *List of Android SDK's*: /opt/android-sdk/tools/bin/sdkmanager --list:
       Installed packages:
         Path                              | Version | Description                       | Location                         
         -------                           | ------- | -------                           | -------                          
         add-ons;addon-g..._apis-google-23 | 1.0.0   | Google APIs, Android 23           | add-ons/addon-g...apis-google-23/
         build-tools;21.1.2                | 21.1.2  | Android SDK Build-Tools 21.1.2    | build-tools/21.1.2/              
         build-tools;22.0.1                | 22.0.1  | Android SDK Build-Tools 22.0.1    | build-tools/22.0.1/              
         build-tools;23.0.3                | 23.0.3  | Android SDK Build-Tools 23.0.3    | build-tools/23.0.3/              
         build-tools;25.0.2                | 25.0.2  | Android SDK Build-Tools 25.0.2    | build-tools/25.0.2/              
         emulator                          | 26.0.0  | Android Emulator                  | emulator/   
       ...
       
    *List of Android devices*: /opt/android-sdk/tools/bin/avdmanager list:
       ----------
       id: 3 or "android-23"
            Name: Android API 23
            Type: Platform
            API level: 23
            Revision: 3
       ----------
       id: 4 or "android-25"
            Name: Android API 25
            Type: Platform
            API level: 25
            Revision: 3
       ...
       
    *Create new Android Emulator*:
       /opt/android-sdk/tools/bin/avdmanager create avd --name TiEmulator --device 1 --package "system-images;android-23;default;x86_64"}}
       
    Reminds me of the iOS simulator list. More infos: https://developer.android.com/studio/command-line/sdkmanager.html
  3. Gary Mathews 2017-04-04

    <android-sdk>/tools/android.* is removed in Revision 25.3.0 (March 2017) but this revision and later is currently not available to download. I believe Google may have pulled these revisions due to this breaking change. UPDATE: Android Studio 2.3 ships with SDK Tools 25.3.1
  4. Chris Barber 2017-04-05

    Titanium SDK master PR: https://github.com/appcelerator/titanium_mobile/pull/8929 Titanium SDK 6_1_X PR: https://github.com/appcelerator/titanium_mobile/pull/8935 Titanium SDK 6_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/8931 To test, 1. Run ti info -t android and ti info -t android -o json and verify output 2. Run ti build -p android 3. Run ti build -p android --device-id foo 4. Run ti build -p android --device-id <valid id from ti info> 5. Run ti build -p android --build-only 6. Run ti build -p android -T device --build-only 7. Run ti build -p android -T dist-playstore
  5. Lokesh Choudhary 2017-04-10

    Verified & merged the fix in the above mentioned PR's, waiting for the build from CI to close the ticket.
  6. Lokesh Choudhary 2017-04-21

    Verified the fix in 6.0.4.v20170420100617. Closing.

JSON Source