Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25865] Android: Build warning appears when Android build-tools v27 or higher is installed

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2018-06-07T02:40:15.000+0000
Affected Version/sn/a
Fix Version/sRelease 7.3.0
ComponentsAndroid
Labelsandroid, build, build-tools
ReporterJoshua Quick
AssigneeJoshua Quick
Created2018-03-14T02:43:13.000+0000
Updated2018-06-22T17:56:22.000+0000

Description

*Summary:* In the Android SDK, if you install build-tools version 27.0.0 or higher and then do an Android build via Titanium, then the following warning message will be logged...
[WARN] :   Android Build Tools 27.0.3 are too new and may or may not work with Titanium.
[WARN] :   If you encounter problems, select a supported version with:
[WARN] :      appc ti config android.buildTools.selectedVersion ##.##.##
[WARN] :    where ##.##.## is a version in /Users/user/Library/Android/sdk/build-tools that is 26.x
Android build-tools 27.x.x so far appears to work fine with Titanium builds. So, this warning is harmless for now. But in the future, Google could make breaking changes to their build-tools and we need to protect against this to help future proof our build system. *Test:*

Open Google's "Android SDK Manager".

Make sure the newest 26.x.x build-tools version is installed.

Make sure the newest 27.x.x build-tools version is installed.

Do a Titanium Android build.

Observe the log for the above mentioned warning.

*Cause:* Titanium currently only supports build-tools version 26.x.x as defined by our "package.json" here... https://github.com/appcelerator/titanium_mobile/blob/master/android/package.json#L25 But the CLI ignores this setting and always uses the newest build-tools version available in the Android SDK instead of using the preferred version defined by our "package.json". This is because the linked code below will return a "maybe" string instead of true for a version higher than supported version, but it still evaluates as a positive in the if condition... https://github.com/appcelerator/node-titanium-sdk/blob/master/lib/android.js#L768 *Recommended Solution:* CLI should be changed to favor the build-tools version defined in the "package.json". A newer version outside of this range should only be selected if no preferred version is installed, in which case, the build-tools warning is desired. We should not make this change until after updating Titanium's "package.json" to support build-tools 27.x.x. This is to avoid a possible breaking change with developers who only have 27.x.x installed. _(Shouldn't cause an issue, but better safe than sorry.)_

Comments

  1. Joshua Quick 2018-05-07

    PR: https://github.com/appcelerator/node-titanium-sdk/pull/28
  2. Lokesh Choudhary 2018-05-10

    FR Passed. Waiting for CR & merge to get enabled.
  3. Lokesh Choudhary 2018-06-05

    [~jquick], We will have to make a PR for updating the package.json.
  4. Joshua Quick 2018-06-06

    Ticket [TIMOB-25867], which has already been merged in, has a regression. We should either revert it or use my proposed fix for [TIMOB-26099] in 7.3.0. We need to decide before updating the "package.json".
  5. Lokesh Choudhary 2018-06-22

    Verified the fix in SDK 7.3.0.v20180618182516. Closing.

JSON Source