Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24778] CLI: Minimum android build tools is incorrect

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2017-06-06T15:52:02.000+0000
Affected Version/sRelease 6.1.0
Fix Version/sRelease 6.1.1
ComponentsAndroid, CLI
Labelsn/a
ReporterEwan Harris
AssigneeEwan Harris
Created2017-06-06T09:42:04.000+0000
Updated2017-06-06T21:39:39.000+0000

Description

Description

TIMOB-24733 appears to have created a dependency on the Android build tools being 23.0.1 or above (see error below). When building with lower than this, due to the hard dependency I would expect that there would be a warning/error telling me that my build tools are unsupported/wont work, but I do not see this.
[INFO]  Running AAPT: /Users/eharris/Library/Android/sdk/build-tools/22.0.1/aapt "package" "-f" "-m" "-J" "/Users/eharris/Documents/git/work/kitchensink-v2/build/android/gen" "-M" "/Users/eharris/Documents/git/work/kitchensink-v2/build/android/AndroidManifest.xml" "-A" "/Users/eharris/Documents/git/work/kitchensink-v2/build/android/bin/assets" "-S" "/Users/eharris/Documents/git/work/kitchensink-v2/build/android/res" "-I" "/Users/eharris/Library/Android/sdk/platforms/android-23/android.jar" "-F" "/Users/eharris/Documents/git/work/kitchensink-v2/build/android/bin/app.ap_" "--output-text-symbols" "/Users/eharris/Documents/git/work/kitchensink-v2/build/android/intermediates/bundles" "--no-version-vectors" "--auto-add-overlay" "--extra-packages" "ti.modules.titanium.ui:android.support.v7.appcompat:android.support.v7.cardview:com.google.android.gms:com.facebook"
[ERROR] Failed to package application:
[ERROR]
[ERROR] ERROR: Unknown option '--no-version-vectors'
[ERROR] Android Asset Packaging Tool
[ERROR]
[ERROR] Usage:
[ERROR]  aapt l[ist] [-v] [-a] file.{zip,jar,apk}
[ERROR]    List contents of Zip-compatible archive.
[ERROR]
[ERROR]  aapt d[ump] [--values] [--include-meta-data] WHAT file.{apk} [asset [asset ...]]
[ERROR]    strings          Print the contents of the resource table string pool in the APK.
[ERROR]    badging          Print the label and icon for the app declared in APK.
[ERROR]    permissions      Print the permissions from the APK.
[ERROR]    resources        Print the resource table from the APK.
[ERROR]    configurations   Print the configurations in the APK.
[ERROR]    xmltree          Print the compiled xmls in the given assets.
[ERROR]    xmlstrings       Print the strings of the given compiled xml assets.
[ERROR]
[ERROR]  aapt p[ackage] [-d][-f][-m][-u][-v][-x][-z][-M AndroidManifest.xml] \
[ERROR]         [-0 extension [-0 extension ...]] [-g tolerance] [-j jarfile] \
[ERROR]         [--debug-mode] [--min-sdk-version VAL] [--target-sdk-version VAL] \
[ERROR]         [--app-version VAL] [--app-version-name TEXT] [--custom-package VAL] \
[ERROR]         [--rename-manifest-package PACKAGE] \
[ERROR]         [--rename-instrumentation-target-package PACKAGE] \
[ERROR]         [--utf16] [--auto-add-overlay] \
[ERROR]         [--max-res-version VAL] \
[ERROR]         [-I base-package [-I base-package ...]] \
[ERROR]         [-A asset-source-dir]  [-G class-list-file] [-P public-definitions-file] \
[ERROR]         [-S resource-sources [-S resource-sources ...]] \
[ERROR]         [-F apk-file] [-J R-file-dir] \
[ERROR]         [--product product1,product2,...] \
[ERROR]         [-c CONFIGS] [--preferred-configurations CONFIGS] \
[ERROR]         [--split CONFIGS [--split CONFIGS]] \
[ERROR]         [--feature-of package [--feature-after package]] \
[ERROR]         [raw-files-dir [raw-files-dir] ...] \
[ERROR]         [--output-text-symbols DIR]
[ERROR]
[ERROR]    Package the android resources.  It will read assets and resources that are
[ERROR]    supplied with the -M -A -S or raw-files-dir arguments.  The -J -P -F and -R
[ERROR]    options control which files are output.
[ERROR]
[ERROR]  aapt r[emove] [-v] file.{zip,jar,apk} file1 [file2 ...]
[ERROR]    Delete specified files from Zip-compatible archive.
[ERROR]
[ERROR]  aapt a[dd] [-v] file.{zip,jar,apk} file1 [file2 ...]
[ERROR]    Add specified files to Zip-compatible archive.
[ERROR]
[ERROR]  aapt c[runch] [-v] -S resource-sources ... -C output-folder ...
[ERROR]    Do PNG preprocessing on one or several resource folders
[ERROR]    and store the results in the output folder.
[ERROR]
[ERROR]  aapt s[ingleCrunch] [-v] -i input-file -o outputfile
[ERROR]    Do PNG preprocessing on a single file.
[ERROR]
[ERROR]  aapt v[ersion]
[ERROR]    Print program version.
[ERROR]
[ERROR]  Modifiers:
[ERROR]    -a  print Android-specific data (resources, manifest) when listing
[ERROR]    -c  specify which configurations to include.  The default is all
[ERROR]        configurations.  The value of the parameter should be a comma
[ERROR]        separated list of configuration values.  Locales should be specified
[ERROR]        as either a language or language-region pair.  Some examples:
[ERROR]             en
[ERROR]             port,en
[ERROR]             port,land,en_US
[ERROR]    -d  one or more device assets to include, separated by commas
[ERROR]    -f  force overwrite of existing files
[ERROR]    -g  specify a pixel tolerance to force images to grayscale, default 0
[ERROR]    -j  specify a jar or zip file containing classes to include
[ERROR]    -k  junk path of file(s) added
[ERROR]    -m  make package directories under location specified by -J
[ERROR]    -u  update existing packages (add new, replace older, remove deleted files)
[ERROR]    -v  verbose output
[ERROR]    -x  create extending (non-application) resource IDs
[ERROR]    -z  require localization of resource attributes marked with
[ERROR]        localization="suggested"
[ERROR]    -A  additional directory in which to find raw asset files
[ERROR]    -G  A file to output proguard options into.
[ERROR]    -F  specify the apk file to output
[ERROR]    -I  add an existing package to base include set
[ERROR]    -J  specify where to output R.java resource constant definitions
[ERROR]    -M  specify full path to AndroidManifest.xml to include in zip
[ERROR]    -P  specify where to output public resource definitions
[ERROR]    -S  directory in which to find resources.  Multiple directories will be scanned
[ERROR]        and the first match found (left to right) will take precedence.
[ERROR]    -0  specifies an additional extension for which such files will not
[ERROR]        be stored compressed in the .apk.  An empty string means to not
[ERROR]        compress any files at all.
[ERROR]    --debug-mode
[ERROR]        inserts android:debuggable="true" in to the application node of the
[ERROR]        manifest, making the application debuggable even on production devices.
[ERROR]    --include-meta-data
[ERROR]        when used with "dump badging" also includes meta-data tags.
[ERROR]    --pseudo-localize
[ERROR]        generate resources for pseudo-locales (en-XA and ar-XB).
[ERROR]    --min-sdk-version
[ERROR]        inserts android:minSdkVersion in to manifest.  If the version is 7 or
[ERROR]        higher, the default encoding for resources will be in UTF-8.
[ERROR]    --target-sdk-version
[ERROR]        inserts android:targetSdkVersion in to manifest.
[ERROR]    --max-res-version
[ERROR]        ignores versioned resource directories above the given value.
[ERROR]    --values
[ERROR]        when used with "dump resources" also includes resource values.
[ERROR]    --version-code
[ERROR]        inserts android:versionCode in to manifest.
[ERROR]    --version-name
[ERROR]        inserts android:versionName in to manifest.
[ERROR]    --replace-version
[ERROR]        If --version-code and/or --version-name are specified, these
[ERROR]        values will replace any value already in the manifest. By
[ERROR]        default, nothing is changed if the manifest already defines
[ERROR]        these attributes.
[ERROR]    --custom-package
[ERROR]        generates R.java into a different package.
[ERROR]    --extra-packages
[ERROR]        generate R.java for libraries. Separate libraries with ':'.
[ERROR]    --generate-dependencies
[ERROR]        generate dependency files in the same directories for R.java and resource package
[ERROR]    --auto-add-overlay
[ERROR]        Automatically add resources that are only in overlays.
[ERROR]    --preferred-density
[ERROR]        Specifies a preference for a particular density. Resources that do not
[ERROR]        match this density and have variants that are a closer match are removed.
[ERROR]    --split
[ERROR]        Builds a separate split APK for the configurations listed. This can
[ERROR]        be loaded alongside the base APK at runtime.
[ERROR]    --feature-of
[ERROR]        Builds a split APK that is a feature of the apk specified here. Resources
[ERROR]        in the base APK can be referenced from the the feature APK.
[ERROR]    --feature-after
[ERROR]        An app can have multiple Feature Split APKs which must be totally ordered.
[ERROR]        If --feature-of is specified, this flag specifies which Feature Split APK
[ERROR]        comes before this one. The first Feature Split APK should not define
[ERROR]        anything here.
[ERROR]    --rename-manifest-package
[ERROR]        Rewrite the manifest so that its package name is the package name
[ERROR]        given here.  Relative class names (for example .Foo) will be
[ERROR]        changed to absolute names with the old package so that the code
[ERROR]        does not need to change.
[ERROR]    --rename-instrumentation-target-package
[ERROR]        Rewrite the manifest so that all of its instrumentation
[ERROR]        components target the given package.  Useful when used in
[ERROR]        conjunction with --rename-manifest-package to fix tests against
[ERROR]        a package that has been renamed.
[ERROR]    --product
[ERROR]        Specifies which variant to choose for strings that have
[ERROR]        product variants
[ERROR]    --utf16
[ERROR]        changes default encoding for resources to UTF-16.  Only useful when API
[ERROR]        level is set to 7 or higher where the default encoding is UTF-8.
[ERROR]    --non-constant-id
[ERROR]        Make the resources ID non constant. This is required to make an R java class
[ERROR]        that does not contain the final value but is used to make reusable compiled
[ERROR]        libraries that need to access resources.
[ERROR]    --shared-lib
[ERROR]        Make a shared library resource package that can be loaded by an application
[ERROR]        at runtime to access the libraries resources. Implies --non-constant-id.
[ERROR]    --error-on-failed-insert
[ERROR]        Forces aapt to return an error if it fails to insert values into the manifest
[ERROR]        with --debug-mode, --min-sdk-version, --target-sdk-version --version-code
[ERROR]        and --version-name.
[ERROR]        Insertion typically fails if the manifest already defines the attribute.
[ERROR]    --error-on-missing-config-entry
[ERROR]        Forces aapt to return an error if it fails to find an entry for a configuration.
[ERROR]    --output-text-symbols
[ERROR]        Generates a text file containing the resource symbols of the R class in the
[ERROR]        specified folder.
[ERROR]    --ignore-assets
[ERROR]        Assets to be ignored. Default pattern is:
[ERROR]        !.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~

Steps to reproduce

Install Android SDK Build-tools@22.0.1

Build a project with appc run -p android -T device --build-only

Actual

Build errors out with the above error

Expected

Build should error out with an error stating the build tools are unsupported

Comments

  1. Ewan Harris 2017-06-06

    Master PR: https://github.com/appcelerator/titanium_mobile/pull/9112 6_1_X: https://github.com/appcelerator/titanium_mobile/pull/9115
  2. Chris Barber 2017-06-06

  3. Samir Mohammed 2017-06-06

JSON Source