[TIMOB-24555] Android: Latest Android Tools breaks development with Titanium
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Critical |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2017-04-10T23:26:25.000+0000 |
| Affected Version/s | Release 6.0.3 |
| Fix Version/s | Release 6.0.4 |
| Components | Android |
| Labels | android, build-tools |
| Reporter | Hans Knöchel |
| Assignee | Chris Barber |
| Created | 2017-04-04T05:12:01.000+0000 |
| Updated | 2017-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
| File | Date | Size |
|---|---|---|
| sdkmanager.jpg | 2017-04-04T12:09:10.000+0000 | 72614 |
Currently,
25.2.3is 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.htmlThey recommend the
sdkmanagerandavdmanagerfor 25.2.3 and later. Some usage details: *SDK-Manager options*:*AVD-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.*List of Android SDK's*: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./opt/android-sdk/tools/bin/sdkmanager --list:*List of Android devices*: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/ .../opt/android-sdk/tools/bin/avdmanager list:*Create new Android Emulator*:---------- 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 ...Reminds me of the iOS simulator list. More infos: https://developer.android.com/studio/command-line/sdkmanager.html<android-sdk>/tools/android.*is removed inRevision 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 Tools25.3.1Titanium 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 androidandti info -t android -o jsonand verify output 2. Runti build -p android3. Runti build -p android --device-id foo4. Runti build -p android --device-id <valid id from ti info>5. Runti build -p android --build-only6. Runti build -p android -T device --build-only7. Runti build -p android -T dist-playstoreVerified & merged the fix in the above mentioned PR's, waiting for the build from CI to close the ticket.
Verified the fix in 6.0.4.v20170420100617. Closing.