Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19475] Android: Build fails if target SDK is lower than API 23

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-09-08T18:35:21.000+0000
Affected Version/sRelease 5.0.0
Fix Version/sRelease 5.0.0
ComponentsTooling
Labelsqe-5.0.0
ReporterEwan Harris
AssigneeFeon Sua Xin Miao
Created2015-09-07T22:53:09.000+0000
Updated2015-09-21T17:42:01.000+0000

Description

Description

When building an app for Android and API 23 (Android 6.0) is not installed or is not set as the target SDK then the build will fail with the below errors
[ERROR] Failed to package application:

[ERROR]
[ERROR] C:\Users\Ewan\AppData\Local\Temp\11587-3632-barql9\res\values-v23\styles_base.xml:20: error: Error retrieving parent for item: No resource found that matches
 the given name 'android:Widget.Material.Button.Colored'.
[ERROR]
[ERROR] C:\Users\Ewan\AppData\Local\Temp\11587-3632-barql9\res\values-v23\styles_base_text.xml:19: error: Error retrieving parent for item: No resource found that ma
tches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
This error is related to app compat which has been updated in [this commit](https://github.com/appcelerator/titanium_mobile/pull/7128)

Steps to reproduce

1. Either uninstall API 23 or set the target SDK in the tiapp.xml using <uses-sdk android:targetSdkVersion="21"/> 2. Build for Android using appc run -p android -T device --build-only

Actual result

The build will fail

Expected result

The build should exit and tell the user that API 23 is required to build using 5.0.0

Comments

  1. Feon Sua Xin Miao 2015-09-08

    Isn't API 21 the minimum supported Android SDK to build apps?
  2. Feon Sua Xin Miao 2015-09-08

    master: https://github.com/appcelerator/titanium_mobile/pull/7139 5_0_X: https://github.com/appcelerator/titanium_mobile/pull/7144
  3. Chris Barber 2015-09-09

    5_0_X revert: https://github.com/appcelerator/titanium_mobile/pull/7156
  4. Satyam Sekhri 2015-09-15

    No build failure when Android API 23 not installed or target less than API level 23. Verified on: Mac OS 10.10.5 Appc CLI NPM: 4.2.0-8 Appc CLI Core: 5.0.0-51 Titanium CLI: 5.0.3 SDK: 5.0.0.v20150914163105

JSON Source